public function init()
 {
     if (!$this->name) {
         $this->name = "Файловый менеджер";
     }
     parent::init();
 }
Example #2
0
 public function init()
 {
     //Если название не задано, покажем что нибудь.
     if (!$this->name) {
         $this->name = Inflector::humanize($this->id);
     }
     if (!$this->controller instanceof AdminController) {
         throw new InvalidParamException(\Yii::t('app', 'This action is designed to work with the controller: ') . AdminController::className());
     }
     $this->defaultView = $this->id;
     if ($this->viewName) {
         $this->defaultView = $this->viewName;
     }
     parent::init();
 }
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     if (parent::beforeAction($action)) {
         $componentClassName = \Yii::$app->request->get('componentClassName');
         $namespace = \Yii::$app->request->get('componentNamespace');
         if ($namespace) {
             $component = new $componentClassName(['namespace' => $namespace]);
         } else {
             $component = new $componentClassName();
         }
         if (!$component || !$component instanceof Component) {
             throw new UserException("Указан некорректный компонент");
         }
         if (!$component->existsConfigFormFile()) {
             throw new UserException("У компонента не задана форма для управления настройками");
         }
         $this->_component = $component;
         return true;
     } else {
         return false;
     }
 }
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     if (parent::beforeAction($action)) {
         $componentClassName = \Yii::$app->request->get('componentClassName');
         $namespace = \Yii::$app->request->get('componentNamespace');
         if ($namespace) {
             $component = new $componentClassName(['namespace' => $namespace]);
         } else {
             $component = new $componentClassName();
         }
         if (!$component || !$component instanceof Component) {
             throw new UserException("Указан некорректный компонент");
         }
         $this->_component = $component;
         $this->_callableData = $this->_getCallableData($component);
         //TODO: Добавить возможность настройки
         \Yii::$app->view->theme = new Theme(['pathMap' => ['@app/views' => ['@skeeks/cms/modules/admin/views']]]);
         \Yii::$app->language = \Yii::$app->admin->languageCode;
         return true;
     } else {
         return false;
     }
 }
Example #5
0
 public function init()
 {
     $this->name = \Yii::t('app', "Code generator");
     parent::init();
 }
Example #6
0
 public function init()
 {
     $this->name = \Yii::t('app', "Job to database");
     parent::init();
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ['class' => AdminAction::className(), 'name' => 'Список', "icon" => "glyphicon glyphicon-th-list", "priority" => 0]]);
 }
Example #8
0
 public function init()
 {
     $this->name = \Yii::t('app', "{ssh} console", ['ssh' => 'Ssh']);
     parent::init();
 }
Example #9
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [self::BEHAVIOR_ACTION_MANAGER => [], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['session' => ['post']]]]);
 }
 public function init()
 {
     $this->name = \Yii::t('v3toys/skeeks', 'Товары');
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Reports on orders');
     parent::init();
 }
 public function init()
 {
     $this->name = "Маркетплейс";
     parent::init();
 }
 /**
  * @param \yii\base\Action $action
  * @return bool
  * @throws \yii\web\BadRequestHttpException
  */
 public function beforeAction($action)
 {
     if (parent::beforeAction($action)) {
         if ($action instanceof AdminOneModelEditAction) {
             if ($this->model !== null) {
                 return true;
             } else {
                 //throw new NotFoundHttpException('Не найдено');
                 $this->redirect($this->getIndexUrl());
             }
         }
         return true;
     } else {
         return false;
     }
 }
Example #14
0
 public function init()
 {
     $this->name = \Yii::t('app', "Information about the system");
     parent::init();
 }
Example #15
0
 public function init()
 {
     $this->name = "Управление серверами";
     parent::init();
 }
Example #16
0
 public function init()
 {
     $this->name = \Yii::t('app', "Deleting temporary files");
     parent::init();
 }
Example #17
0
 public function init()
 {
     $this->name = "Управление шаблоном";
     parent::init();
 }
Example #18
0
 public function init()
 {
     $this->name = "Управление настройками";
     parent::init();
 }
 public function init()
 {
     $this->name = \Yii::t('skeeks/shop/app', 'Reports on orders');
     parent::init();
 }
 public function init()
 {
     $this->name = \Yii::t('v3toys/skeeks', 'Информация по api');
     parent::init();
 }
Example #21
0
 public function init()
 {
     $this->name = \Yii::t('app', "Checking system");
     parent::init();
 }
Example #22
0
 public function init()
 {
     $this->name = \Yii::t('app', "Desktop");
     parent::init();
 }
Example #23
0
 public function init()
 {
     $this->name = \Yii::t('app', "Testing send email messages from site");
     parent::init();
 }