/**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['multilingual' => ['class' => MultilingualActiveRecord::className(), 'translationModelClass' => PageTranslation::className()], 'CacheableActiveRecord' => ['class' => \DevGroup\TagDependencyHelper\CacheableActiveRecord::className()], 'timestamp' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => false, 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()')]];
 }
Exemple #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), 'CacheableActiveRecord' => ['class' => \DevGroup\TagDependencyHelper\CacheableActiveRecord::className()]];
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['CacheableActiveRecord' => ['class' => CacheableActiveRecord::className()], 'packedJson' => ['class' => PackedJsonAttributes::className()]];
 }
Exemple #4
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['class' => CacheableActiveRecord::className()]);
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['json_attributes' => ['class' => PackedJsonAttributes::className()], 'CacheableActiveRecord' => ['class' => CacheableActiveRecord::className()], 'multilingual' => ['class' => MultilingualActiveRecord::className(), 'translationPublishedAttribute' => false]];
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['CacheableActiveRecord' => ['class' => CacheableActiveRecord::className()]];
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['multilingual' => ['class' => MultilingualActiveRecord::className(), 'translationModelClass' => PostTranslation::className()], 'CacheableActiveRecord' => ['class' => \DevGroup\TagDependencyHelper\CacheableActiveRecord::className()], 'timestamp' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => false, 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()')], ['class' => ImageBehavior::className(), 'savePathAlias' => '@app/web/images/', 'urlPrefix' => '/images/', 'crop' => true, 'attributes' => ['photo' => ['savePathAlias' => '@app/web/images/', 'urlPrefix' => '/images/', 'width' => 1040, 'height' => 700, 'thumbnails' => ['mini' => ['width' => 120, 'height' => 120]]]]]];
 }
Exemple #8
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['CacheableActiveRecord' => ['class' => CacheableActiveRecord::className()], 'updateTimestamps' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()')]];
 }