本文整理汇总了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;
}