2017 © Pedro Peláez
 

yii2-extension yii2-author-behavior

Author behavior for Yii 2 framework.

image

t-kanstantsin/yii2-author-behavior

Author behavior for Yii 2 framework.

  • Thursday, December 24, 2015
  • by tkanstantsin
  • Repository
  • 0 Watchers
  • 0 Stars
  • 71 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Author behavoir

Behavior represents additional functionality similar to yii\db\TimestampBehavior but automatically fills the specified attributes with the current user id or value defined in value field., (*1)

Install

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

$ php composer.phar require --prefer-dist t-kanstantsin/yii2-author-behavior "*"

or add, (*4)

"t-kanstantsin/yii2-author-behavior": "*"

to the require section of your composer.json file., (*5)

Usage

Example behavior configuration:, (*6)

    // in `behaviors` method
    [
        'class' => tkanstantsin\yii2\behaviors\AuthorBehavior::class, 
        'createdByAttribute' => 'created_by_id',
        'updatedByAttribute' => 'updated_by_id',
    ],

Credits

License

The BSD License (BSD). Please see License File for more information., (*7)

The Versions

24/12 2015

dev-master

9999999-dev https://github.com/t-kanstantsin/yii2-author-behavior

Author behavior for Yii 2 framework.

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 yii yii 2 behavior