PHP code example of open20 / amos-news

1. Go to this page and download the library: Download open20/amos-news library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

open20 / amos-news example snippets


 'news' => [
	'class' => 'open20\amos\news\AmosNews',
 ],


'news' => [
        'class' => 'open20\amos\news\AmosNews',
        'params' => [
            'site_publish_enabled' => true,
            'site_featured_enabled' => true
        ]
    ],

 'news' => [
	'class' => 'open20\amos\news\AmosNews',
	'validatePublicationDate' => false, //changed property (default was true)
 ],

    'news' => [
      'class' => 'open20\amos\news\AmosNews',
      'filterCategoriesByRole' => true
    ]

'news' => [
    'class' => 'open20\amos\news\AmosNews',
    'newsRequiredFields' => ['news_categorie_id', 'status']  
],

'news' => [
    'class' => 'open20\amos\news\AmosNews',
    'defaultCategory' => 3  
],

'news' => [
    'class' => 'open20\amos\news\AmosNews',
    'autoUpdatePublicationDate' => true
],