/** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } CitybrandingHelper::addSubmenu('votes'); $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $canDo = CitybrandingHelper::getActions(); $this->canManageSteps = $canDo->get('citybranding.manage.steps'); $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } CitybrandingHelper::addSubmenu('steps'); $this->addToolbar(); if (!$this->canManageSteps) { JFactory::getApplication()->enqueueMessage(JText::_('COM_CITYBRANDING_ACTION_NOT_ALLOWED'), 'error'); return; } $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); }