ftp = $this->get('Ftp'); $this->option = $this->get('Option'); $this->pagination = $this->get('Pagination'); $this->rows = $this->get('Data'); $this->total = $this->get('Total'); $this->state = $this->get('State'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); LanguagesHelper::addSubmenu('installed'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_languages'); if ((int) $this->state->get('client_id') === 1) { JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_ADMIN_TITLE'), 'comments-2 langmanager'); } else { JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_SITE_TITLE'), 'comments-2 langmanager'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::makeDefault('installed.setDefault'); JToolbarHelper::divider(); } if ($canDo->get('core.admin')) { // Add install languages link to the lang installer component. $bar = JToolbar::getInstance('toolbar'); // Switch administrator language if ($this->state->get('client_id', 0) == 1) { JToolbarHelper::custom('installed.switchadminlanguage', 'refresh', 'refresh', 'COM_LANGUAGES_SWITCH_ADMIN', false); JToolbarHelper::divider(); } $bar->appendButton('Link', 'upload', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages'); JToolbarHelper::divider(); JToolbarHelper::preferences('com_languages'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED'); $this->sidebar = JHtmlSidebar::render(); } }