本文整理匯總了PHP中JAccess::getActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP JAccess::getActions方法的具體用法?PHP JAccess::getActions怎麽用?PHP JAccess::getActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JAccess
的用法示例。
在下文中一共展示了JAccess::getActions方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: auth
protected function auth($area)
{
//echo '<pre>' . print_r(JAccess::getActions('com_chessvn','gamechat'),true).'</pre>';die();
$aclLocal = array();
foreach (JAccess::getActions('com_chessvn', 'gamechat') as $ar) {
$aclLocal[] = $ar->name;
}
if (in_array($area, $aclLocal)) {
return $this->user->authorise($area, 'com_chessvn', 'gamechat');
} else {
$aclGlobal = array();
foreach (JAccess::getActions('com_chessvn') as $ar) {
$aclGlobal[] = $ar->name;
}
if (in_array($area, $aclGlobal)) {
if (!empty($aclLocal)) {
JFactory::getApplication()->enqueueMessage('Undefined authorization area: ' . $area . ' -- fall back on component acl', 'Warning');
}
return $this->user->authorise($area, 'com_chessvn');
} else {
JFactory::getApplication()->enqueueMessage('Undefined authorization area: ' . $area . ' -- NO fall back found', 'Error');
return true;
}
}
}
示例2: getActions
/**
* Gets a list of the actions that can be performed.
*
* @param integer The category ID.
*
* @return JObject
* @since 1.6
*/
public static function getActions($categoryId = 0)
{
$user = JFactory::getUser();
$result = new JObject;
if (empty($categoryId))
{
$assetName = 'com_mvceditor';
$level = 'component';
}
else
{
$assetName = 'com_mvceditor.category.'.(int) $categoryId;
$level = 'category';
}
$actions = JAccess::getActions('com_mvceditor', $level);
foreach ($actions as $action)
{
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}
示例3: edit
function edit()
{
JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
$document =& JFactory::getDocument();
$document->setTitle(JText::_('COM_JEVENTS_CONFIGURATION'));
// Set toolbar items for the page
JToolBarHelper::title(JText::_('COM_JEVENTS_CONFIGURATION'), 'jevents');
//APPLY BUTTON BY PRAKASH.
JToolBarHelper::apply('params.apply');
//APPLY BUTTON
JToolBarHelper::save('params.save');
JToolBarHelper::cancel('cpanel.cpanel');
$model = $this->getModel();
$this->params =& $model->getParams();
$component = JComponentHelper::getComponent(JEV_COM_COMPONENT);
JHTML::_('behavior.tooltip');
if (JVersion::isCompatible("1.6.0")) {
// Get the actions for the asset.
$actions = JAccess::getActions(JEV_COM_COMPONENT, "component");
jimport('joomla.form.form');
// Add the search path for the admin component config.xml file.
JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/' . JEV_COM_COMPONENT);
// Get the form.
$modelForm = $model->getForm();
$this->assignRef("form", $modelForm);
}
}
示例4: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return Object
*/
public static function getActions()
{
$result = new \Hubzero\Base\Object();
$actions = JAccess::getActions('com_templates');
foreach ($actions as $action) {
$result->set($action->name, User::authorise($action->name, 'com_templates'));
}
return $result;
}
示例5: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return JObject
*/
public static function getActions()
{
$user = JFactory::getUser();
$result = new JObject();
$actions = JAccess::getActions('com_messages');
foreach ($actions as $action) {
$result->set($action->name, $user->authorise($action->name, 'com_messages'));
}
return $result;
}
示例6: getActions
/**
* Get list of all actions described in access.xml
*
* @return array of strings
*/
public static function getActions()
{
jimport('joomla.access.access');
$result = array();
$actions = JAccess::getActions('com_newsletter', 'component');
foreach ($actions as $action) {
$result[] = $action->name;
}
return $result;
}
示例7: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return Object
*/
public static function getActions()
{
$result = new \Hubzero\Base\Object();
$assetName = 'com_languages';
$actions = JAccess::getActions($assetName);
foreach ($actions as $action) {
$result->set($action->name, User::authorise($action->name, $assetName));
}
return $result;
}
示例8: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return object
*/
public static function getActions()
{
$result = new Object();
$assetName = self::$extension;
$actions = \JAccess::getActions($assetName);
foreach ($actions as $action) {
$result->set($action->name, User::authorise($action->name, $assetName));
}
return $result;
}
示例9: getActions
/**
* Gets a list of the actions that can be performed.
*
* @return JObject
*/
public static function getActions()
{
$user = JFactory::getUser();
$result = new JObject();
$assetName = 'com_redirect';
$actions = JAccess::getActions($assetName);
foreach ($actions as $action) {
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}
示例10: 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;
}
示例11: getActions
public static function getActions($messageId = 0)
{
jimport('joomla.access.access');
$user = JFactory::getUser();
$result = new JObject();
$assetName = 'com_fees';
$actions = JAccess::getActions('com_fees', 'component');
foreach ($actions as $action) {
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}
示例12: getActions
/**
* @return JObject
*/
public static function getActions()
{
$user = JFactory::getUser();
$result = new JObject();
$assetName = 'com_estivole';
$level = 'component';
$actions = JAccess::getActions('com_estivole', $level);
foreach ($actions as $action) {
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}
示例13: 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;
}
示例14: getActions
public static function getActions($messageId = 0)
{
$result = new JObject();
if (empty($messageId)) {
$assetName = 'com_heartcare';
} else {
$assetName = 'com_heartcare.message.' . (int) $messageId;
}
$actions = JAccess::getActions('com_heartcare', 'component');
foreach ($actions as $action) {
$result->set($action->name, JFactory::getUser()->authorise($action->name, $assetName));
}
return $result;
}
示例15: getActions
/**
* Gets a list of the actions that can be performed.
*
* @param integer The category ID.
* @param integer The contact ID.
*
* @return JObject
* @since 1.6
*/
public static function getActions($contactId = 0)
{
$user = JFactory::getUser();
$result = new JObject();
if (empty($contactId)) {
$assetName = 'com_b2jcontact';
$level = 'component';
}
$actions = JAccess::getActions('com_b2jcontact', $level);
foreach ($actions as $action) {
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}