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