Author: Alexander Kochetov (creocoder@gmail.com)
Inheritance: extends yii\base\Behavior
コード例 #1
0
ファイル: CategoriesBehavior.php プロジェクト: ahb360/kalpok
 public function init()
 {
     parent::init();
     $this->tagValuesAsArray = $this->catValuesAsArray;
     $this->tagRelation = $this->catRelation;
     $this->tagValueAttribute = $this->catValueAttribute;
     $this->tagFrequencyAttribute = $this->catFrequencyAttribute;
 }
コード例 #2
0
ファイル: Article.php プロジェクト: beaten-sect0r/yii2-core
 /**
  * @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
ファイル: Posts.php プロジェクト: sydorenkovd/yiiadv
 public function behaviors()
 {
     return ['tagPost' => ['class' => TaggableBehavior::className(), 'tagRelation' => 'tagPost']];
 }
コード例 #4
0
ファイル: Post.php プロジェクト: ninjacto/ninjacto.com
 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
ファイル: Post.php プロジェクト: creocoder/yii2-taggable
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TaggableBehavior::className()];
 }