當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JAccess::getActions方法代碼示例

本文整理匯總了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;
         }
     }
 }
開發者ID:khangcodt,項目名稱:nvssehcweb,代碼行數:25,代碼來源:view.html.php

示例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;
	}	
開發者ID:utopszkij,項目名稱:lmp,代碼行數:33,代碼來源:mvceditor.php

示例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);
     }
 }
開發者ID:andreassetiawanhartanto,項目名稱:PDKKI,代碼行數:27,代碼來源:view.html.php

示例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;
 }
開發者ID:mined-gatech,項目名稱:hubzero-cms,代碼行數:14,代碼來源:templates.php

示例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;
 }
開發者ID:exntu,項目名稱:joomla-cms,代碼行數:15,代碼來源:messages.php

示例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;
 }
開發者ID:Rikisha,項目名稱:proj,代碼行數:15,代碼來源:acl.php

示例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;
 }
開發者ID:mined-gatech,項目名稱:hubzero-cms,代碼行數:15,代碼來源:languages.php

示例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;
 }
開發者ID:mined-gatech,項目名稱:hubzero-cms,代碼行數:15,代碼來源:plugins.php

示例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;
 }
開發者ID:acculitx,項目名稱:fleetmatrixsite,代碼行數:16,代碼來源:redirect.php

示例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;
 }
開發者ID:kevinwojo,項目名稱:hubzero-cms,代碼行數:19,代碼來源:users.php

示例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;
 }
開發者ID:jmangarret,項目名稱:webtuagencia24,代碼行數:12,代碼來源:fees.php

示例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;
 }
開發者ID:gorgozilla,項目名稱:Estivole,代碼行數:15,代碼來源:estivole.php

示例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;
 }
開發者ID:RuDers,項目名稱:JoomlaSQL,代碼行數:20,代碼來源:users.php

示例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;
 }
開發者ID:bobozhangshao,項目名稱:admin-com_heartcare,代碼行數:14,代碼來源:heartcare.php

示例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;
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:23,代碼來源:contact.php


注:本文中的JAccess::getActions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。