public function init()
 {
     if ($this->model && \Yii::$app->cmsToolbar) {
         $controller = \Yii::$app->createController('cms/admin-cms-content-element')[0];
         $adminControllerRoute = ['cms/admin-cms-content-element/update', $controller->requestPkParamName => $this->model->{$controller->modelPkAttribute}];
         $urlEditModel = UrlHelper::construct($adminControllerRoute)->enableAdmin()->setSystemParam(\skeeks\cms\modules\admin\Module::SYSTEM_QUERY_EMPTY_LAYOUT, 'true')->toString();
         \Yii::$app->cmsToolbar->editUrl = $urlEditModel;
     }
     parent::init();
 }
Beispiel #2
0
 public function init()
 {
     parent::init();
     self::onceInit();
     if (!$this->name) {
         $this->name = \Yii::t('app', 'The name of the controller');
         //Inflector::humanize($this->id);
     }
     $this->layout = \Yii::$app->cms->moduleAdmin()->layout;
     \Yii::$app->trigger(self::EVENT_INIT, new AdminInitEvent(['name' => self::EVENT_INIT, 'controller' => $this]));
 }
Beispiel #3
0
 public function init()
 {
     parent::init();
 }