Esempio n. 1
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'name', 'icon' => 'fa-language bg-teal'], CacheBehavior::className(), ['class' => SortableGridBehavior::className(), 'sortableAttribute' => 'position']];
 }
Esempio n. 2
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), DateTimeBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-bars bg-olive'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'slug', 'description', 'content', 'image_description', 'redirect', 'meta_title', 'meta_keywords', 'meta_description'], 'translationLanguageAttribute' => 'locale'], ['class' => ImageUploadBehavior::className(), 'attribute' => 'image', 'defaultImage' => '/images/no_image.png', 'thumbs' => ['small' => ['width' => 150, 'height' => 100], 'big' => ['width' => 450, 'height' => 150]], 'filePath' => '@frontend/web/uploads/news/[[id_path]]/[[pk]].[[extension]]', 'fileUrl' => '/uploads/news/[[id_path]]/[[pk]].[[extension]]', 'thumbPath' => '@frontend/web/uploads/news/[[id_path]]/[[profile]]_[[pk]].[[extension]]', 'thumbUrl' => '/uploads/news/[[id_path]]/[[profile]]_[[pk]].[[extension]]'], ['class' => ManyToManyBehavior::className(), 'relations' => [['editableAttribute' => 'categories', 'table' => '{{%news_news_category}}', 'ownAttribute' => 'news_id', 'relatedModel' => NewsCategory::className(), 'relatedAttribute' => 'category_id', 'fillingRoute' => ['news/news/create', 'news/news/update']]]], ['class' => TaggableBehavior::className()], ['class' => GalleryBehavior::className(), 'galleryClass' => NewsGallery::className()]];
 }
Esempio n. 3
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-flag bg-maroon'], ['class' => ImageUploadBehavior::className(), 'attribute' => 'image', 'filePath' => '@frontend/web/uploads/banner/[[pk]]/[[pk]].[[extension]]', 'fileUrl' => '/uploads/banner/[[pk]]/[[pk]].[[extension]]'], ['class' => DateTimeBehavior::className(), 'attributes' => [BaseActiveRecord::EVENT_BEFORE_INSERT => ['date_start', 'date_end'], BaseActiveRecord::EVENT_BEFORE_UPDATE => ['date_start', 'date_end'], BaseActiveRecord::EVENT_AFTER_FIND => ['date_start', 'date_end']], 'format' => 'datePHPFormat']];
 }
Esempio n. 4
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'name', 'icon' => 'fa-text-height bg-light-blue'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['text'], 'translationLanguageAttribute' => 'locale']];
 }
Esempio n. 5
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), PositionBehavior::className(), CacheBehavior::className(), TreeBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-map-signs bg-dark-olive-green'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'link'], 'translationLanguageAttribute' => 'locale']];
 }
Esempio n. 6
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), ['class' => PositionBehavior::className(), 'parentIdAttribute' => 'slider_id'], CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-sliders bg-tan'], ['class' => ImageUploadBehavior::className(), 'attribute' => 'image', 'thumbs' => ['slide' => ['width' => 1400, 'height' => 730]], 'filePath' => '@frontend/web/uploads/slide/[[pk]]/[[pk]].[[extension]]', 'fileUrl' => '/uploads/slide/[[pk]]/[[pk]].[[extension]]', 'thumbPath' => '@frontend/web/uploads/slide/[[pk]]/[[profile]]_[[pk]].[[extension]]', 'thumbUrl' => '/uploads/slide/[[pk]]/[[profile]]_[[pk]].[[extension]]'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'description', 'link'], 'translationLanguageAttribute' => 'locale'], ['class' => SortableGridBehavior::className(), 'sortableAttribute' => 'position']];
 }
Esempio n. 7
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'email', 'icon' => 'fa-user bg-blue'], ['class' => ImageUploadBehavior::className(), 'attribute' => 'image', 'defaultImage' => '/images/avatar.jpg', 'thumbs' => ['avatar' => ['width' => 100, 'height' => 100]], 'filePath' => '@frontend/web/uploads/users/[[pk]]/[[pk]].[[extension]]', 'fileUrl' => '/uploads/users/[[pk]]/[[pk]].[[extension]]', 'thumbPath' => '@frontend/web/uploads/users/[[pk]]/[[profile]]_[[pk]].[[extension]]', 'thumbUrl' => '/uploads/users/[[pk]]/[[profile]]_[[pk]].[[extension]]']];
 }
Esempio n. 8
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), PositionBehavior::className(), CacheBehavior::className(), TreeBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-cubes bg-lime'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'slug', 'body', 'meta_title', 'meta_keywords', 'meta_description'], 'translationLanguageAttribute' => 'locale']];
 }
Esempio n. 9
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-question-circle bg-aqua'], ['class' => DateTimeBehavior::className(), 'attributes' => [BaseActiveRecord::EVENT_BEFORE_INSERT => ['date_start', 'date_end'], BaseActiveRecord::EVENT_BEFORE_UPDATE => ['date_start', 'date_end'], BaseActiveRecord::EVENT_AFTER_FIND => ['date_start', 'date_end']], 'format' => 'datePHPFormat'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title'], 'translationLanguageAttribute' => 'locale']];
 }
Esempio n. 10
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'old_url', 'icon' => 'fa-exchange bg-redirect']];
 }
Esempio n. 11
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), CacheBehavior::className(), ['class' => AdminLogBehavior::className(), 'titleAttribute' => 'title', 'icon' => 'fa-file-o bg-orange'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'slug', 'description', 'content', 'meta_title', 'meta_keywords', 'meta_description'], 'translationLanguageAttribute' => 'locale']];
 }