Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => TimestampBehavior::className(), 'attributes' => [static::EVENT_BEFORE_INSERT => ['created_at']]], OwnerBehavior::className()];
 }
Esempio n. 2
0
 /**
  * @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()];
 }