public function init() { parent::init(); $this->tagValuesAsArray = $this->catValuesAsArray; $this->tagRelation = $this->catRelation; $this->tagValueAttribute = $this->catValueAttribute; $this->tagFrequencyAttribute = $this->catFrequencyAttribute; }
/** * @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()]; }
public function behaviors() { return ['tagPost' => ['class' => TaggableBehavior::className(), 'tagRelation' => 'tagPost']]; }
public function behaviors() { return ['taggable' => ['class' => TaggableBehavior::className(), 'tagValuesAsArray' => false, 'tagRelation' => 'tags', 'tagValueAttribute' => 'title', 'tagFrequencyAttribute' => 'frequency'], ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'slug']]; }
/** * @inheritdoc */ public function behaviors() { return [TaggableBehavior::className()]; }