示例#1
0
文件: Vote.php 项目: bariew/sitown
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => TimestampBehavior::className(), 'attributes' => [static::EVENT_BEFORE_INSERT => ['created_at']]], OwnerBehavior::className()];
 }
示例#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()];
 }