sem-soft / yii2-behaviors
Set of additional behaviors and filters for Yii2 Framework
Package info
github.com/sem-soft/yii2-behaviors
Type:yii2-behaviors
pkg:composer/sem-soft/yii2-behaviors
1.0.5
2018-04-23 15:19 UTC
Requires
- php: >=5.4.0
README
Install by composer
composer require sem-soft/yii2-behaviors
Or add this code into require section of your composer.json and then call composer update in console
"sem-soft/yii2-behaviors": "*"
Usage
// Model behaviors public function behaviors() { return[ // Удаляем "точку" перед валидацией [ 'class' => TrimmerBehavior::className(), 'attributes' => ['sitemap_priority'], 'characterMask' => '.' ] ]; } // Controller filters public function behaviors() { return [ // Действие hint запрашивается только AJAX-ом 'ajax' => [ 'class' => AjaxFilter::className(), 'actions' => ['hint'], ], ]; }