public function display($tpl = null) { $this->option = JFactory::getApplication()->input->get('option'); $this->version = new Emailtemplates\Version(); // Load ITPrism library version if (!class_exists('\\Prism\\Version')) { $this->prismVersion = JText::_('COM_EMAILTEMPLATES_PRISM_LIBRARY_DOWNLOAD'); } else { $prismVersion = new Prism\Version(); $this->prismVersion = $prismVersion->getShortVersion(); if (version_compare($this->prismVersion, $this->version->requiredPrismVersion, '<')) { $this->prismVersionLowerMessage = JText::_('COM_EMAILTEMPLATES_PRISM_LIBRARY_LOWER_VERSION'); } } // Add submenu EmailTemplatesHelper::addSubmenu($this->getName()); $this->addToolbar(); $this->addSidebar(); $this->setDocument(); parent::display($tpl); }
public function display($tpl = null) { $this->option = JFactory::getApplication()->input->get('option'); $this->state = $this->get('State'); $this->form = $this->get('Form'); $this->importType = $this->state->get('import.context'); switch ($this->importType) { case 'placeholders': $this->legend = JText::_('COM_EMAILTEMPLATES_IMPORT_PLACEHOLDERS'); $this->uploadTask = 'import.placeholders'; break; default: // Emails $this->legend = JText::_('COM_EMAILTEMPLATES_IMPORT_EMAILS'); $this->uploadTask = 'import.emails'; break; } // Add submenu EmailTemplatesHelper::addSubmenu($this->importType); // Prepare actions $this->addToolbar(); $this->setDocument(); parent::display($tpl); }
/** * Prepare sidebar. */ protected function addSidebar() { EmailTemplatesHelper::addSubmenu($this->getName()); $this->sidebar = JHtmlSidebar::render(); }