Author: Alexander Kochetov (creocoder@gmail.com)
Inheritance: extends yii\base\Behavior
Ejemplo n.º 1
0
 public function init()
 {
     parent::init();
     $this->tagValuesAsArray = $this->catValuesAsArray;
     $this->tagRelation = $this->catRelation;
     $this->tagValueAttribute = $this->catValueAttribute;
     $this->tagFrequencyAttribute = $this->catFrequencyAttribute;
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), ['class' => BlameableBehavior::className(), 'createdByAttribute' => 'author_id', 'updatedByAttribute' => 'updater_id'], ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'ensureUnique' => true, 'immutable' => true], TaggableBehavior::className()];
 }
Ejemplo n.º 3
0
 public function behaviors()
 {
     return ['tagPost' => ['class' => TaggableBehavior::className(), 'tagRelation' => 'tagPost']];
 }
Ejemplo n.º 4
0
 public function behaviors()
 {
     return ['taggable' => ['class' => TaggableBehavior::className(), 'tagValuesAsArray' => false, 'tagRelation' => 'tags', 'tagValueAttribute' => 'title', 'tagFrequencyAttribute' => 'frequency'], ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'slug']];
 }
Ejemplo n.º 5
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TaggableBehavior::className()];
 }