Example #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), ['timestamp' => ['class' => TimestampBehavior::className(), 'updatedAtAttribute' => 'updated_at', 'createdAtAttribute' => 'created_at'], 'serialize' => ['class' => SerializeBehavior::className(), 'fields' => ['meta']], 'slug' => ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'ensureUnique' => true]]);
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at'], 'related' => ['filedSuffix' => '_list', 'class' => RelatedBehavior::className(), 'fields' => ['items' => PageHasBlock::className()]], 'serialize' => ['class' => SerializeBehavior::className(), 'fields' => ['meta']]];
 }