Author: Alexander Kochetov (creocoder@gmail.com)
Inheritance: extends yii\base\Behavior
Beispiel #1
0
 public function init()
 {
     parent::init();
     $this->tagValuesAsArray = $this->catValuesAsArray;
     $this->tagRelation = $this->catRelation;
     $this->tagValueAttribute = $this->catValueAttribute;
     $this->tagFrequencyAttribute = $this->catFrequencyAttribute;
 }
Beispiel #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()];
 }
Beispiel #3
0
 public function behaviors()
 {
     return ['tagPost' => ['class' => TaggableBehavior::className(), 'tagRelation' => 'tagPost']];
 }
Beispiel #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']];
 }
Beispiel #5
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TaggableBehavior::className()];
 }