示例#1
0
 public function behaviors()
 {
     /**
      * @var CatalogModule $catalog
      */
     $catalog = Yii::$app->getModule('admin')->getModule('catalog');
     return [['class' => SortableDateController::className(), 'model' => Item::className()], ['class' => StatusController::className(), 'model' => Item::className()], ['class' => ModelLoaderController::class, 'rules' => [['actions' => ['related-sort'], 'ownerAttribute' => 'relatedItem2Model', 'modelClass' => Yii::createObject(['class' => $catalog->itemClass])->getRelatedBehavior()->getEnumerationModel()->getModels()->modelClass], ['actions' => ['update', 'sort-insert', 'related'], 'ownerAttribute' => 'item', 'modelClass' => $catalog->itemClass], ['actions' => ['set-related'], 'queryAttribute' => 'ownerId', 'ownerAttribute' => 'item', 'modelClass' => $catalog->itemClass, 'queryType' => 'POST'], ['actions' => ['set-related'], 'queryAttribute' => 'relatedId', 'ownerAttribute' => 'relatedItem', 'modelClass' => $catalog->itemClass, 'queryType' => 'POST']]], 'access' => ['class' => AccessControl::class, 'rules' => [['allow' => false, 'actions' => ['sort-insert'], 'verbs' => ['GET']], ['allow' => true, 'actions' => []]]]];
 }
 public function behaviors()
 {
     return [['class' => SortableDateController::className(), 'model' => Item::className()], ['class' => StatusController::className(), 'model' => Item::className()]];
 }
示例#3
0
 public function behaviors()
 {
     return [['class' => StatusController::className(), 'model' => News::className()]];
 }
示例#4
0
 public function behaviors()
 {
     return [['class' => SortableController::className(), 'model' => CarouselCatalog::className()], ['class' => StatusController::className(), 'model' => CarouselCatalog::className()]];
 }
示例#5
0
 /**
  * @return array
  */
 public function behaviors()
 {
     return ['status' => ['class' => StatusController::className(), 'model' => MenuItem::className()]];
 }