示例#1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['authorBehavior' => ['class' => AuthorBehavior::className()], 'sluggableBehavior' => ['class' => SluggableBehavior::className(), 'attribute' => 'name', 'slugAttribute' => 'slug', 'ensureUnique' => true]];
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['authorBehavior' => ['class' => AuthorBehavior::className()], 'sluggableBehavior' => ['class' => SluggableBehavior::className(), 'attribute' => 'name', 'slugAttribute' => 'slug', 'ensureUnique' => true], 'timestampBehavior' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => 'createdAt', 'updatedAtAttribute' => 'modifiedAt', 'value' => new Expression('NOW()')]];
 }
示例#3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['authorBehavior' => ['class' => AuthorBehavior::className()], 'timestampBehavior' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => 'createdAt', 'updatedAtAttribute' => 'modifiedAt', 'value' => new Expression('NOW()')]];
 }