/** * Get current logged user allowed actions. * * @return JObject */ public static function getActions($section) { $user = JFactory::getUser(); /* @var $user JUser */ $result = new JObject(); foreach (get_defined_constants() as $key => $value) { if (JString::strpos($key, 'JOOMDOC_CORE_') === 0) { $result->set($value, $user->authorise($value, JoomDOCHelper::getAction($section))); } } return $result; }