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