/** * Method to add a toolbar */ protected function addToolbar() { $state = $this->get('State'); $canDo = JsserviceHelper::getActions(); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolBarHelper::title(JText::_('COM_JSSERVICE')); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_jsservice'); } }
/** * Checks whether a user can see this view. * * @param string $view The view name. * * @return boolean * @since 1.6 */ protected function canView($view) { $canDo = JsserviceHelper::getActions(); return $canDo->get('core.admin'); }