2017 © Pedro Peláez
 

yii2-extension yii2-statusbehavior

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

image

jberall/yii2-statusbehavior

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  • Saturday, May 27, 2017
  • by jberall
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Status Behavior

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist jberall/yii2-statusbehavior "*"

or add, (*4)

"jberall/yii2-statusbehavior": "*"

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

Usage

Once the extension is installed, simply use it in your code by :, (*6)

```php public function behaviors() {, (*7)

    $behaviors = [

        'statusBehavior' => [
            'class' => \frontend\behaviors\StatusBehavior::className(),
            'status_column' => 'status_id',

        ],
    ];
    return ArrayHelper::merge(parent::behaviors(),$behaviors);

}  

The Versions

27/05 2017

dev-master

9999999-dev

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  Sources   Download

Apache-2.0

The Requires

 

by Jonathan Berall

extension yii2 behavior status

26/05 2017

v1.0

1.0.0.0

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  Sources   Download

Apache-2.0

The Requires

 

by Jonathan Berall

extension yii2 behavior status

26/05 2017

v1.02

1.02.0.0

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  Sources   Download

Apache-2.0

The Requires

 

by Jonathan Berall

extension yii2 behavior status

28/04 2017

v1.01

1.01.0.0

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  Sources   Download

Apache-2.0

The Requires

 

by Jonathan Berall

extension yii2 behavior status

28/04 2017

v1.03

1.03.0.0

A behavior that set the status to 0 when the status_column is set to null. triggered on BaseActiveRecord::EVENT_BEFORE_INSERT and BaseActiveRecord::EVENT_BEFORE_UPDATE

  Sources   Download

Apache-2.0

The Requires

 

by Jonathan Berall

extension yii2 behavior status