/**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => SerializeBehavior::className(), 'attributes' => ['subject', 'content']]];
 }
예제 #2
0
파일: Question.php 프로젝트: bariew/sitown
 /**
  * @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()];
 }