/** * @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']]]; }
/** * @inheritdoc */ public function behaviors() { return ['trans' => ['class' => TranslationBehavior::className(), 'translationAttributes' => ['translation']]]; }
/** * @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']]]; }