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']]; }
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()]]; }
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']]; }
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']]; }
public function behaviors() { return [['class' => TranslateableBehavior::className(), 'translationAttributes' => ['name'], 'translationLanguageAttribute' => 'locale']]; }
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']]; }
/** * @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']]; }
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']]; }
public function behaviors() { return [['class' => ImageUploadBehavior::className(), 'attribute' => 'image', 'tabularAttribute' => 'gallery_id', 'source' => 'GalleryFilesSources', 'thumbs' => ['small' => ['width' => 150, 'height' => 100], 'big' => ['width' => 450, 'height' => 150]], 'filePath' => '@frontend/web/uploads/news_gallery/[[id_path]]/[[pk]].[[extension]]', 'fileUrl' => '/uploads/news_gallery/[[id_path]]/[[pk]].[[extension]]', 'thumbPath' => '@frontend/web/uploads/news_gallery/[[id_path]]/[[profile]]_[[pk]].[[extension]]', 'thumbUrl' => '/uploads/news_gallery/[[id_path]]/[[profile]]_[[pk]].[[extension]]'], ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['image_text'], 'translationLanguageAttribute' => 'locale']]; }