Exemple #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [ImageBehavior::className(), 'serialized' => ['class' => SerializeBehavior::className(), 'attributes' => ['data']]];
 }
Exemple #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), 'imageBehavior' => ['class' => ImageBehavior::className()]];
 }
Exemple #3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => SluggableBehavior::className(), 'attribute' => 'title', 'immutable' => true, 'ensureUnique' => true], ['class' => BlameableBehavior::className(), 'createdByAttribute' => 'created_by', 'updatedByAttribute' => 'updated_by'], 'timestamp' => ['class' => 'yii\\behaviors\\TimestampBehavior'], 'image' => ['class' => ImageBehavior::className(), 'fileAttribute' => 'image', 'sizes' => ['thumb' => [75, 75, 'resize' => 'outbound', 'required' => '@web/img/75x75-required.jpg'], 'default' => [1024, 768, 'required' => '@web/img/1024x768-required.jpg']]]];
 }