Exemplo n.º 1
0
 public function init()
 {
     if (!$this->controller instanceof AdminModelEditorController) {
         throw new InvalidParamException(\Yii::t('app', 'This action is designed to work with the controller: ') . AdminModelEditorController::className());
     }
     parent::init();
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ["columns" => [['class' => DataColumn::className(), 'attribute' => 'name', 'format' => 'raw', 'value' => function (KladrLocation $model) {
         if ($model->parent_id) {
             return $model->fullName . " <small>(" . implode(", ", ArrayHelper::map($model->parents, 'id', 'fullName')) . ") </small>";
         } else {
             return $model->fullName;
         }
     }], ['class' => DataColumn::className(), 'attribute' => 'type', 'filter' => KladrLocation::possibleTypes(), 'value' => function (KladrLocation $model) {
         return $model->typeName;
     }]]], 'update-database' => ["class" => AdminAction::className(), "name" => "Импорт местоположений", "icon" => "glyphicon glyphicon-paperclip", "callback" => [$this, 'actionUpdateDatabase']]]);
 }
Exemplo n.º 3
0
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'callback' => [$this, 'actionIndex']], 'view' => ["class" => AdminOneModelEditAction::className(), "name" => "Смотреть", "icon" => "glyphicon glyphicon-eye-open", "callback" => [$this, "actionView"]], 'create' => ['class' => AdminAction::className(), 'callback' => [$this, 'actionCreate']], "update-data" => ["class" => AdminAction::className(), "name" => \Yii::t('app', "Update privileges"), "icon" => "glyphicon glyphicon-retweet", "method" => "post", "request" => "ajax", 'callback' => [$this, 'actionUpdateData']]]);
 }
Exemplo n.º 4
0
 public function actions()
 {
     $actions = ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'name' => 'Разделы', 'viewParams' => $this->indexData()], 'create' => ['visible' => false], "update" => ['class' => AdminOneModelEditAction::className(), "callback" => [$this, 'update']]]);
     unset($actions['create']);
     return $actions;
 }
Exemplo n.º 5
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => \Yii::t('app', "Clearing temporary data"), "callback" => [$this, 'actionIndex']]];
 }
Exemplo n.º 6
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => "Управление серверами", "callback" => [$this, 'actionIndex']]];
 }
Exemplo n.º 7
0
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'callback' => [$this, 'actionIndex']], 'view' => ["class" => AdminOneModelEditAction::className(), "name" => \Yii::t('app', "Watch"), "icon" => "glyphicon glyphicon-eye-open", "callback" => [$this, "actionView"]], 'create' => ['class' => AdminAction::className(), 'callback' => [$this, 'actionCreate']], "update" => ['class' => AdminOneModelEditAction::className(), 'callback' => [$this, 'actionUpdate']]]);
 }
Exemplo n.º 8
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => \Yii::t('app', "Console"), "callback" => [$this, 'actionIndex']]];
 }
Exemplo n.º 9
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => "Установленные"], "catalog" => ["class" => AdminAction::className(), "name" => "Каталог"], "install" => ["class" => AdminAction::className(), "name" => "Установить/Удалить", "callback" => [$this, 'actionInstall']], "update" => ["class" => AdminAction::className(), "name" => "Обновление платформы"]];
 }
Exemplo n.º 10
0
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'name' => 'Разделы', 'viewParams' => $this->indexData()], 'create' => ['visible' => false]]);
 }
Exemplo n.º 11
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     $view = $this->view;
     return ArrayHelper::merge(parent::actions(), ['create' => ['visible' => false], 'create-order' => ['class' => AdminAction::className(), 'name' => \Yii::t('skeeks/shop/app', 'Place your order'), "icon" => "glyphicon glyphicon-plus", "callback" => [$this, 'createOrder']]]);
 }
Exemplo n.º 12
0
 public function actions()
 {
     return ['index' => ['class' => AdminAction::className(), 'name' => \Yii::t('app', 'General information'), 'viewParams' => $this->indexData()]];
 }
Exemplo n.º 13
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => "Файловый менеджер"]];
 }
Exemplo n.º 14
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => "Настройки", "callback" => [$this, 'actionIndex']]];
 }
Exemplo n.º 15
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => \Yii::t('app', "Testing")]];
 }
 public function actions()
 {
     $actions = ArrayHelper::merge(parent::actions(), ['update-all' => ["class" => AdminAction::className(), "name" => \Yii::t('skeeks/money', "Update all currencies"), "icon" => "glyphicon glyphicon-paperclip", "callback" => [$this, 'actionUpdateAll']], 'update-course' => ["class" => AdminAction::className(), "name" => \Yii::t('skeeks/money', "Refresh rate"), "icon" => "glyphicon glyphicon-paperclip", "callback" => [$this, 'actionUpdateCourse']], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/money', "Activate"), "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \Yii::t('skeeks/money', "Deactivate"), "eachCallback" => [$this, 'eachMultiInActivate']]]);
     return $actions;
 }
Exemplo n.º 17
0
 public function actions()
 {
     return ["index" => ["class" => AdminAction::className(), "name" => \Yii::t('app', "Code generator")]];
 }
Exemplo n.º 18
0
 public function actions()
 {
     return ['index' => ['class' => AdminAction::className(), 'name' => \Yii::t('app', 'Main page'), "visible" => false]];
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'name' => 'Список', "icon" => "glyphicon glyphicon-th-list", "priority" => 0]]);
 }