예제 #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => TimestampBehavior::className(), 'value' => new Expression('NOW()')], 'trans' => ['class' => TranslationBehavior::className(), 'translationAttributes' => ['name', 'title', 'description', 'keywords', 'image', 'alias', 'url', 'text']]];
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['trans' => ['class' => TranslationBehavior::className(), 'translationAttributes' => ['translation']]];
 }
예제 #3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => \yii\behaviors\TimestampBehavior::className(), 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'attributes' => [\yii\db\BaseActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], \yii\db\BaseActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']], 'value' => new \yii\db\Expression('NOW()')], 'trans' => ['class' => \pavlinter\translation\TranslationBehavior::className(), 'translationAttributes' => ['subject', 'text']]];
 }