Commit 031c9cca by Alexander Kochetov

SluggableBehavior phpDoc added

parent 7a81fff9
...@@ -12,7 +12,23 @@ use yii\db\BaseActiveRecord; ...@@ -12,7 +12,23 @@ use yii\db\BaseActiveRecord;
use yii\helpers\Inflector; use yii\helpers\Inflector;
/** /**
* SluggableBehavior * SluggableBehavior automatically fills the specified attribute with the transliteration result of other attribute.
*
* To use SluggableBehavior, simply insert the following code to your ActiveRecord class:
*
* ```php
* use yii\behaviors\SluggableBehavior;
*
* public function behaviors()
* {
* return [
* [
* 'class' => 'SluggableBehavior::className(),
* 'attribute' => 'title',
* ],
* ];
* }
* ```
* *
* @author Alexander Kochetov <creocoder@gmail.com> * @author Alexander Kochetov <creocoder@gmail.com>
* @since 2.0 * @since 2.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment