コード例 #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimestampBehavior::className(), 'attributes' => [static::EVENT_BEFORE_INSERT => ['createdAt']], 'value' => new Expression('NOW()')], 'serializedAttributes' => ['class' => SerializedAttributes::className(), 'attributes' => ['files', 'bcc']]];
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => TimestampBehavior::className(), 'value' => new Expression('NOW()')], ['class' => SerializedAttributes::className(), 'attributes' => ['attributes'], 'encode' => true]];
 }