/** * @inheritdoc */ public function behaviors() { return [['class' => TimestampBehavior::className(), 'attributes' => [static::EVENT_BEFORE_INSERT => ['created_at']]], OwnerBehavior::className()]; }
/** * @inheritdoc */ public function behaviors() { return [['class' => TimestampBehavior::className(), 'attributes' => [static::EVENT_BEFORE_INSERT => ['created_at']]], 'attachedRelations' => ['class' => AttachedRelationBehavior::className(), 'relations' => ['answers']], ['class' => SerializeBehavior::className(), 'type' => SerializeBehavior::TYPE_PHP, 'attributes' => ['event_object']], OwnerBehavior::className()]; }