function display($cachable = false) { // Set default view if not set JRequest::setVar('view', JRequest::getCmd('view', 'HelloWorlds')); parent::display($cachable); // Add submenu HelloWorldHelper::addSubmenu('messages'); }
/** * Задача по отображению. * * @param boolean $cachable Если true, то представление будет закешировано. * @param array $urlparams Массив безопасных url-параметров и их валидных типов переменных. * * @return void */ public function display($cachable = false, $urlparams = array()) { // Устанавливаем представление по умолчанию, если оно не было установлено. $input = JFactory::getApplication()->input; $input->set('view', $input->getCmd('view', 'HelloWorlds')); // Устанавливаем подменю. HelloWorldHelper::addSubmenu('messages'); parent::display($cachable); }
/** * Display task * * @return void */ public function display($cachable = false, $urlparams = array()) { // Set default view if not set $input = JFactory::getApplication()->input; $input->set('view', $input->getCmd('view', 'HelloWorlds')); // Call parent behaviour parent::display($cachable, $urlparams); // Set the submenu HelloWorldHelper::addSubmenu('messages'); }
/** * Display the Hello World view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { // Get application $app = JFactory::getApplication(); $context = "helloworld.list.admin.helloworld"; // Get data from the model $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->filter_order = $app->getUserStateFromRequest($context.'filter_order', 'filter_order', 'greeting', 'cmd'); $this->filter_order_Dir = $app->getUserStateFromRequest($context.'filter_order_Dir', 'filter_order_Dir', 'asc', 'cmd'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // What Access Permissions does this user have? What can (s)he do? $this->canDo = HelloWorldHelper::getActions(); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Set the submenu HelloWorldHelper::addSubmenu('helloworlds'); // Set the toolbar and number of found items $this->addToolBar(); // Display the template parent::display($tpl); // Set the document $this->setDocument(); }