public function __construct($container) { parent::__construct($container); $app = \JFactory::getApplication(); $document = \JFactory::getDocument(); $input = $app->input; $this->tmpl = $input->getCmd('tmpl', ''); $this->option = $input->getCmd('option', ''); $this->view = $input->getCmd('view', ''); $this->layout = $input->getCmd('layout', ''); $this->task = $input->getCmd('task', ''); $this->itemid = $input->getCmd('Itemid', ''); $this->printing = $input->getCmd('print', ''); $this->class = ''; if ($this->itemid) { $menuItem = $app->getMenu()->getActive(); if ($menuItem && $menuItem->id) { $this->class = $menuItem->params->get('pageclass_sfx', ''); } } $templateParams = $app->getTemplate(true); $this->outline = $templateParams->params->get('configuration', !empty($templateParams->id) ? $templateParams->id : 0); $this->sitename = $app->get('sitename'); $this->theme = $templateParams->template; $this->baseUrl = \JUri::base(true); $this->title = $document->title; $this->description = $document->description; $this->language = $document->language; $this->direction = $document->direction; }
public function __construct($container) { parent::__construct($container); $app = \JFactory::getApplication(); $document = \JFactory::getDocument(); $input = $app->input; $this->option = $input->getCmd('option', ''); $this->view = $input->getCmd('view', ''); $this->layout = $input->getCmd('layout', ''); $this->task = $input->getCmd('task', ''); $this->itemid = $input->getCmd('Itemid', ''); $this->sitename = $app->get('sitename'); $this->theme = $document->template; $this->baseUrl = $document->baseurl; $this->title = $document->title; $this->description = $document->description; $this->language = $document->language; $this->direction = $document->direction; }