idealia/yii2-children-count-behavior
Composer 安装命令:
composer require 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.
关键字:
README 文档
README
Behavior for counting records in the dependent objects and updating the relevant column after insert, edit and remove any child record.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require idealia/yii2-children-count-behavior "*"
or add
"idealia/yii2-children-count-behavior": "*"
to the require section of your composer.json file.
Usage
public function behaviors() { return [ [ 'class' => ChildrenCountBehavior::className(), 'countRelation' => 'getDocuments', 'parentRelation' => 'getTask', 'columnToUpdate' => 'document_count' ], ]; }
统计信息
- 总下载量: 261
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2014-12-17