/** * Constructor. */ public function __construct() { parent::__construct(); BackendMenu::setContext('October.Cms', 'media', true); $this->pageTitle = 'cms::lang.media.menu_label'; $manager = new MediaManager($this, 'manager'); $manager->bindToController(); }
/** * Constructor. */ public function __construct() { /* * Allow early access to route data. */ $this->action = BackendController::$action; $this->params = BackendController::$params; /* * Apply $guarded methods to hidden actions */ $this->hiddenActions = array_merge($this->hiddenActions, $this->guarded); /* * Define layout and view paths */ $this->layout = $this->layout ?: 'default'; $this->layoutPath = Skin::getActive()->getLayoutPaths(); $this->viewPath = $this->configPath = $this->guessViewPath(); /* * Add layout paths from the plugin / module context */ $relativePath = dirname(dirname(strtolower(str_replace('\\', '/', get_called_class())))); $this->layoutPath[] = '~/modules/' . $relativePath . '/layouts'; $this->layoutPath[] = '~/plugins/' . $relativePath . '/layouts'; parent::__construct(); /* * Media Manager widget is available on all back-end pages */ $manager = new MediaManager($this, 'ocmediamanager'); $manager->bindToController(); }
/** * Constructor. */ public function __construct() { /* * Allow early access to route data. */ $this->action = BackendController::$action; $this->params = BackendController::$params; /* * Apply $guarded methods to hidden actions */ $this->hiddenActions = array_merge($this->hiddenActions, $this->guarded); /* * Define layout and view paths */ $this->layout = 'default'; $this->layoutPath = Skin::getActive()->getLayoutPaths(); // Option A: (@todo Determine which is faster by benchmark) // $relativePath = strtolower(str_replace('\\', '/', get_called_class())); // $this->viewPath = $this->configPath = ['modules/' . $relativePath, 'plugins/' . $relativePath]; // Option B: $this->viewPath = $this->configPath = $this->guessViewPath(); parent::__construct(); // Media Manager widget is available on all back-end pages $manager = new MediaManager($this, 'ocmediamanager'); $manager->bindToController(); }