PHP code example of frenzelgmbh / cm-activity

1. Go to this page and download the library: Download frenzelgmbh/cm-activity 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/ */

    

frenzelgmbh / cm-activity example snippets



return [
    // ...
    'modules' => [
        // ...
        'activity' => [
            'class' => 'net\frenzel\activity\Module',
            'userIdentityClass' => 'app\models\User',
        ]
    ],
    // ... //
    'params' => [
        // format settings for displaying each date attribute
        'dateControlDisplay' => [
            DateModule::FORMAT_DATE => 'php:d.m.Y',
            DateModule::FORMAT_TIME => 'php:H:i:s A',
            DateModule::FORMAT_DATETIME => 'php:d.m.Y H:i:s A',
        ],
        // format settings for saving each date attribute
        'dateControlSave' => [
            DateModule::FORMAT_DATE => 'php:U',
            DateModule::FORMAT_TIME => 'php:H:i:s',
            DateModule::FORMAT_DATETIME => 'php:Y-m-d H:i:s',
        ],
    ]
];