state = $this->get('State'); $this->items = $this->get('Overrides'); $this->languages = $this->get('Languages'); $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); LanguagesHelper::addSubmenu('overrides'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } $this->addToolbar(); parent::display($tpl); } /** * Adds the page title and toolbar. * * @return void * * @since 2.5 */ protected function addToolbar() { // Get the results for each action $canDo = JHelperContent::getActions('com_languages'); JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'comments-2 langmanager'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('override.add'); } if ($canDo->get('core.edit') && $this->pagination->total) { JToolbarHelper::editList('override.edit'); } if ($canDo->get('core.delete') && $this->pagination->total) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'overrides.delete', 'JTOOLBAR_DELETE'); } if (JFactory::getUser()->authorise('core.admin')) { JToolbarHelper::custom('overrides.purge', 'refresh.png', 'refresh_f2.png', 'COM_LANGUAGES_VIEW_OVERRIDES_PURGE', false); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_languages'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES'); JHtmlSidebar::setAction('index.php?option=com_languages&view=overrides'); $this->sidebar = JHtmlSidebar::render(); } }