For example: php public function behaviors() { return [ 'sort' => [ 'class' => SortableGridBehavior::className(), 'sortableAttribute' => 'sortOrder', 'scopeAttribute' => null ], ]; }
저자: HimikLab
상속: extends yii\base\Behavior
예제 #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']];
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), 'sort' => ['class' => SortableGridBehavior::className(), 'sortableAttribute' => 'sort']];
 }
예제 #3
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']];
 }
 public function behaviors()
 {
     return ['sort' => ['class' => SortableGridBehavior::className(), 'sortableAttribute' => $this->sort_attribute]];
 }
예제 #5
0
파일: Category.php 프로젝트: akula22/fifa
 public function behaviors()
 {
     return ['sort' => ['class' => SortableGridBehavior::className(), 'sortableAttribute' => 'position'], ['class' => \app\components\SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'slug', 'transliterator' => 'Russian-Latin/BGN; NFKD', 'ensureUnique' => true, 'forceUpdate' => true]];
 }
예제 #6
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']];
 }