2017 © Pedro Peláez
 

library yii2-children-count-behavior

Behavior for counting records in the dependent objects and updating the relevant column after insert, edit and remove any child record.

image

idealia/yii2-children-count-behavior

Behavior for counting records in the dependent objects and updating the relevant column after insert, edit and remove any child record.

  • Tuesday, February 16, 2016
  • by pgrzelka
  • Repository
  • 4 Watchers
  • 2 Stars
  • 166 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

yii2-children-count-behavior

Behavior for counting records in the dependent objects and updating the relevant column after insert, edit and remove any child record., (*1)

Installation

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

Either run, (*3)

php composer.phar require idealia/yii2-children-count-behavior "*"

or add, (*4)

"idealia/yii2-children-count-behavior": "*"

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

Usage

php public function behaviors() { return [ [ 'class' => ChildrenCountBehavior::className(), 'countRelation' => 'getDocuments', 'parentRelation' => 'getTask', 'columnToUpdate' => 'document_count' ], ]; }, (*6)

The Versions

16/02 2016

dev-master

9999999-dev https://github.com/Idealia/yii2-children-count-behavior

Behavior for counting records in the dependent objects and updating the relevant column after insert, edit and remove any child record.

  Sources   Download

Apache License

The Requires

  • php >=5.4.0

 

yii2 yii activerecord