2017 © Pedro Peláez
 

yii2-extension cm-activity

activity module for Yii2

image

frenzelgmbh/cm-activity

activity module for Yii2

  • Monday, May 16, 2016
  • by philippfrenzel
  • Repository
  • 0 Watchers
  • 0 Stars
  • 270 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Common Activity Module

This module manages all kind of activities that are assigned to a module and id., (*1)

Installation

Add in 'composer.json':, (*2)

{
    "require": {
        "frenzelgmbh/cm-activity": "*" 
    }
}

Pls. ensure that you add the dateControlOptions into the params section of your config, (*3)

In config '/protected/config/main.php', (*4)

<?php
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',
        ],
    ]
];

Data Structure

The Versions