예제 #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), SettingModel::className(), ['class' => SluggableBehavior::className(), 'attribute' => 'title_h1', 'slugAttribute' => 'slug'], ['class' => \mongosoft\file\UploadImageBehavior::className(), 'attribute' => 'background_image', 'scenarios' => ['insert', 'update'], 'placeholder' => '@webroot/uploads/user/non_image.png', 'createThumbsOnSave' => true, 'path' => '@webroot/uploads/background_image/category_{id}', 'url' => '@web/uploads/background_image/category_{id}'], 'trans' => ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['slug', 'title', 'subtitle', 'title_h1', 'content', 'description', 'meta_title', 'meta_keywords', 'meta_description', 'settings']]];
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), SettingModel::className(), ['class' => BlameableBehavior::className(), 'createdByAttribute' => 'create_user_id', 'updatedByAttribute' => 'update_user_id'], ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'slug'], ['class' => \mongosoft\file\UploadImageBehavior::className(), 'attribute' => 'image', 'scenarios' => ['insert', 'update'], 'placeholder' => '@webroot/uploads/user/non_image.png', 'createThumbsOnSave' => true, 'path' => '@webroot/uploads/news/{id}', 'url' => '@web/uploads/news/{id}', 'thumbPath' => '@webroot/uploads/news/{id}/thumb', 'thumbUrl' => '@web/uploads/news/{id}/thumb', 'thumbs' => ['thumb' => ['width' => 340, 'quality' => 100, 'mode' => 'outbound']]], 'trans' => ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['slug', 'title', 'description', 'content', 'link', 'meta_title', 'meta_keywords', 'meta_description', 'settings']]];
 }
예제 #3
0
파일: Text.php 프로젝트: oakcms/oakcms
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [['class' => SettingModel::className(), 'settingsField' => 'settings', 'module' => false], ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'slug'], 'trans' => ['class' => TranslateableBehavior::className(), 'translationAttributes' => ['title', 'subtitle', 'text', 'settings']], 'sort' => ['class' => SortableGridBehavior::className(), 'sortableAttribute' => 'order']];
 }