/**
  * @inheritdoc
  */
 public function actions()
 {
     $actions = ArrayHelper::merge(parent::actions(), ['index' => ["modelSearchClassName" => ShopCmsContentElementSearch::className(), "dataProviderCallback" => function (ActiveDataProvider $dataProvider) {
         $query = $dataProvider->query;
         /**
          * @var ActiveQuery $query
          */
         //$query->select(['app_company.*', 'count(`app_company_officer_user`.`id`) as countOfficer']);
         $query->with('image');
         $query->with('cmsTree');
         $query->with('cmsContentElementTrees');
         $query->with('cmsContent');
         $query->with('relatedProperties');
         $query->with('relatedElementProperties');
         $query->with('cmsContentElementTrees.tree');
         $query->with('shopProduct');
         $query->with('shopProduct.baseProductPrice');
         //$query->with('shopProduct.minProductPrice');
     }], "create" => ['class' => AdminModelEditorCreateAction::className(), "callback" => [$this, 'create']], "update" => ['class' => AdminOneModelEditAction::className(), "callback" => [$this, 'update']], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/shop/app', 'Activate'), "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/shop/app', 'Deactivate'), "eachCallback" => [$this, 'eachMultiInActivate']], "change-tree-multi" => ['class' => AdminMultiDialogModelEditAction::class, "name" => \Yii::t('skeeks/shop/app', 'The main section'), "viewDialog" => "@skeeks/cms/views/admin-cms-content-element/change-tree-form", "eachCallback" => [\Yii::$app->createController('/cms/admin-cms-content-element')[0], 'eachMultiChangeTree']], "change-trees-multi" => ['class' => AdminMultiDialogModelEditAction::class, "name" => \Yii::t('skeeks/shop/app', 'Related topics'), "viewDialog" => "@skeeks/cms/views/admin-cms-content-element/change-trees-form", "eachCallback" => [\Yii::$app->createController('/cms/admin-cms-content-element')[0], 'eachMultiChangeTrees']], "rp" => ['class' => AdminMultiDialogModelEditAction::class, "name" => \Yii::t('skeeks/shop/app', 'Properties'), "viewDialog" => "@skeeks/cms/views/admin-cms-content-element/multi-rp", "eachCallback" => [\Yii::$app->createController('/cms/admin-cms-content-element')[0], 'eachRelatedProperties']]]);
     if (isset($actions['related-properties'])) {
         unset($actions['related-properties']);
     }
     if (isset($actions['shop'])) {
         unset($actions['shop']);
     }
     return $actions;
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     $actions = ArrayHelper::merge(parent::actions(), ["index" => ['modelSearchClassName' => CmsContentElementSearch::className()], "create" => ['class' => AdminModelEditorCreateAction::className(), "callback" => [$this, 'create']], "update" => ['class' => AdminOneModelEditAction::className(), "callback" => [$this, 'update']], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/cms', 'Activate'), "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/cms', 'Deactivate'), "eachCallback" => [$this, 'eachMultiInActivate']], "change-tree-multi" => ['class' => AdminMultiDialogModelEditAction::className(), "name" => \Yii::t('skeeks/cms', 'The main section'), "viewDialog" => "change-tree-form", "eachCallback" => [$this, 'eachMultiChangeTree']], "change-trees-multi" => ['class' => AdminMultiDialogModelEditAction::className(), "name" => \Yii::t('skeeks/cms', 'Related topics'), "viewDialog" => "change-trees-form", "eachCallback" => [$this, 'eachMultiChangeTrees']], "rp" => ['class' => AdminMultiDialogModelEditAction::className(), "name" => \Yii::t('skeeks/cms', 'Properties'), "viewDialog" => "multi-rp", "eachCallback" => [$this, 'eachRelatedProperties']]]);
     return $actions;
 }
예제 #3
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => ModelEditorGridAction::className(), 'name' => \Yii::t('app', 'List'), "icon" => "glyphicon glyphicon-th-list", "priority" => 10], 'create' => ['class' => AdminModelEditorCreateAction::className(), 'name' => \Yii::t('app', 'Add'), "icon" => "glyphicon glyphicon-plus"], "update" => ['class' => AdminOneModelUpdateAction::className(), "name" => \Yii::t('app', "Edit"), "icon" => "glyphicon glyphicon-pencil", "priority" => 10], "delete" => ['class' => AdminOneModelEditAction::className(), "name" => \Yii::t('app', "Delete"), "icon" => "glyphicon glyphicon-trash", "confirm" => \Yii::t('yii', 'Are you sure you want to delete this item?'), "method" => "post", "request" => "ajax", "callback" => [$this, 'actionDelete'], "priority" => 99999], "delete-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('app', "Delete"), "icon" => "glyphicon glyphicon-trash", "confirm" => \Yii::t('yii', 'Are you sure you want to permanently delete the selected items?'), "eachCallback" => [$this, 'eachMultiDelete'], "priority" => 99999]]);
 }
예제 #4
0
 public function actions()
 {
     $actions = ArrayHelper::merge(parent::actions(), ["index" => ['modelSearchClassName' => CmsUserSearch::className()], 'create' => ['class' => AdminModelEditorCreateAction::className(), "callback" => [$this, 'create']], 'update' => ['class' => AdminOneModelEditAction::className(), "callback" => [$this, 'update']], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => "Активировать", "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => "Деактивировать", "eachCallback" => [$this, 'eachMultiInActivate']]]);
     return $actions;
 }