/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. * * @see JViewLegacy::loadTemplate() * @since 1.0 */ public function display($tpl = null) { SichtweitenHelper::addSubmenu('help'); // Get current version of Sichtweiten $component = JComponentHelper::getComponent('com_sichtweiten'); $extensions = JTable::getInstance('extension'); $extensions->load($component->id); $manifest = json_decode($extensions->manifest_cache); $this->version = $manifest->version; $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. * * @throws Exception * * @since 1.0 */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); SichtweitenHelper::addSubmenu('visibilityreports'); $this->sidebar = JHtmlSidebar::render(); return parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. * * @throws Exception * @since 1.3.0 */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); if ($this->state->params->get('extern_db')) { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('COM_SICHTWEITEN_MASTERDATA_NOT_AVAILABLE'), 'error'); $app->redirect('index.php?option=com_sichtweiten'); } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); SichtweitenHelper::addSubmenu('waters'); $this->sidebar = JHtmlSidebar::render(); return parent::display($tpl); }