sem-soft / yii2-behaviors
Set of additional behaviors and filters for Yii2 Framework
Installs: 1 454
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-behaviors
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'], ], ]; }