本文整理匯總了PHP中UsersHelper::actions方法的典型用法代碼示例。如果您正苦於以下問題:PHP UsersHelper::actions方法的具體用法?PHP UsersHelper::actions怎麽用?PHP UsersHelper::actions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UsersHelper
的用法示例。
在下文中一共展示了UsersHelper::actions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return Object
*
* @since 1.6
* @todo Refactor to work with notes
*/
public static function getActions()
{
if (empty(self::$actions)) {
self::$actions = new \Hubzero\Base\Object();
$actions = JAccess::getActions('com_users');
foreach ($actions as $action) {
self::$actions->set($action->name, User::authorise($action->name, 'com_users'));
}
}
return self::$actions;
}
示例2: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return JObject
*
* @since 1.6
* @todo Refactor to work with notes
*/
public static function getActions()
{
if (empty(self::$actions)) {
$user = JFactory::getUser();
self::$actions = new JObject();
$actions = JAccess::getActions('com_users');
foreach ($actions as $action) {
self::$actions->set($action->name, $user->authorise($action->name, 'com_users'));
}
}
return self::$actions;
}
示例3: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return JObject
*
* @since 1.6
* @todo Refactor to work with notes
*/
public static function getActions()
{
if (empty(self::$actions)) {
$user = JFactory::getUser();
self::$actions = new JObject();
$actions = array('core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.state', 'core.delete');
foreach ($actions as $action) {
self::$actions->set($action, $user->authorise($action, 'com_users'));
}
}
return self::$actions;
}