Ejemplo n.º 1
0
 /**
  * Saves the context to a protected variable and runs the checks
  *
  * Always returns true for non-dispatched requests
  *
  * @param                 $name
  * @param KCommandContext $context
  * @return bool
  */
 public function execute($name, KCommandContext $context)
 {
     if (!$this->isDispatched()) {
         return true;
     }
     $this->_context = $context;
     return parent::execute($name, $context);
 }
Ejemplo n.º 2
0
 public function canBrowse()
 {
     $result = false;
     if (parent::canBrowse()) {
         if (version_compare(JVERSION, '1.6.0', 'ge')) {
             $result = JFactory::getUser()->authorise('core.create') === true;
         } else {
             $result = JFactory::getUser()->get('gid') > 18;
         }
     }
     return $result;
 }