当前位置: 首页>>代码示例>>PHP>>正文


PHP Permission::checkAccess方法代码示例

本文整理汇总了PHP中Permission::checkAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP Permission::checkAccess方法的具体用法?PHP Permission::checkAccess怎么用?PHP Permission::checkAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Permission的用法示例。


在下文中一共展示了Permission::checkAccess方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Controller for the Backend Settings views
  * 
  * @param \Cx\Core\Core\Model\Entity\SystemComponentController $systemComponentController the system component controller object
  * @param \Cx\Core\Core\Controller\Cx                          $cx                        the cx object
  * @param \Cx\Core\Html\Sigma                                  $template                  the template object
  * @param string                                               $submenu                   the submenu name
  */
 public function __construct(\Cx\Core\Core\Model\Entity\SystemComponentController $systemComponentController, \Cx\Core\Core\Controller\Cx $cx)
 {
     //check the user permission
     \Permission::checkAccess(1032, 'static');
     parent::__construct($systemComponentController, $cx);
     $this->em = $this->cx->getDb()->getEntityManager();
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:15,代码来源:SettingsController.class.php

示例2: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $subMenuTitle, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             define('CALENDAR_MANDATE', MODULE_INDEX);
             $objCalendar = new \Cx\Modules\Calendar\Controller\Calendar($page->getContent(), MODULE_INDEX);
             $page->setContent($objCalendar->getCalendarPage());
             if ($objCalendar->pageTitle) {
                 $page->setTitle($objCalendar->pageTitle);
                 $page->setContentTitle($objCalendar->pageTitle);
                 $page->setMetaTitle($objCalendar->pageTitle);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(16, 'static');
             $subMenuTitle = $_CORELANG['TXT_CALENDAR'];
             $objCalendarManager = new \Cx\Modules\Calendar\Controller\CalendarManager();
             $objCalendarManager->getCalendarPage();
             break;
         default:
             break;
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:31,代码来源:ComponentController.class.php

示例3: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $page, $objTemplate, $subMenuTitle;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $newsObj = new News(\Env::get('cx')->getPage()->getContent());
             \Env::get('cx')->getPage()->setContent($newsObj->getNewsPage());
             $newsObj->getPageTitle(\Env::get('cx')->getPage()->getTitle());
             // Set the meta page description to the teaser text if displaying news details
             $teaser = $newsObj->getTeaser();
             if ($teaser !== null) {
                 //news details, else getTeaser would return null
                 $page->setMetadesc(contrexx_raw2xhtml(contrexx_strip_tags(html_entity_decode($teaser, ENT_QUOTES, CONTREXX_CHARSET))));
             }
             if (substr($page->getCmd(), 0, 7) == 'details') {
                 \Env::get('cx')->getPage()->setTitle($newsObj->newsTitle);
                 \Env::get('cx')->getPage()->setContentTitle($newsObj->newsTitle);
                 \Env::get('cx')->getPage()->setMetaTitle($newsObj->newsTitle);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(10, 'static');
             $subMenuTitle = $_CORELANG['TXT_NEWS_MANAGER'];
             $objNews = new NewsManager();
             $objNews->getPage();
             break;
         default:
             break;
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:37,代码来源:ComponentController.class.php

示例4: getAccessableMethods

 /**
  * Returns an array of method names accessable from a JSON request
  *
  * @return array List of method names
  */
 public function getAccessableMethods()
 {
     if (!\Permission::checkAccess(47, 'static', true)) {
         return array();
     }
     return array('updateOption', 'saveOptions', 'activatePreset', 'addPreset', 'removePreset', 'resetPreset');
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:12,代码来源:JsonController.class.php

示例5: load

 /**
  * Load your component.
  *
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $subMenuTitle, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $objGallery = new Gallery(\Env::get('cx')->getPage()->getContent());
             \Env::get('cx')->getPage()->setContent($objGallery->getPage());
             $topGalleryName = $objGallery->getTopGalleryName();
             if ($topGalleryName) {
                 \Env::get('cx')->getPage()->setTitle($topGalleryName);
                 \Env::get('cx')->getPage()->setContentTitle($topGalleryName);
                 \Env::get('cx')->getPage()->setMetaTitle($topGalleryName);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(12, 'static');
             $subMenuTitle = $_CORELANG['TXT_GALLERY_TITLE'];
             $objGalleryManager = new GalleryManager();
             $objGalleryManager->getPage();
             break;
         default:
             break;
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:31,代码来源:ComponentController.class.php

示例6: initFrontendEditing

 /**
  * Init the frontend editing.
  *
  * Register the javascripts and css files
  * Adds the used language variables to contrexx-js variables, so the toolbar has access to these variables
  *
  * @param ComponentController $componentController
  */
 public function initFrontendEditing(\Cx\Core_Modules\FrontendEditing\Controller\ComponentController $componentController)
 {
     global $_ARRAYLANG;
     // get necessary objects
     $objInit = \Env::get('init');
     $page = $this->cx->getPage();
     // add css and javascript file
     $jsFilesRoot = substr(ASCMS_CORE_MODULE_FOLDER . '/' . $componentController->getName() . '/View/Script', 1);
     \JS::registerCSS(substr(ASCMS_CORE_MODULE_FOLDER . '/' . $componentController->getName() . '/View/Style/Main.css', 1));
     \JS::registerJS($jsFilesRoot . '/Main.js');
     \JS::activate('cx');
     // not used for contrexx version 3.1
     //        \JS::registerJS($jsFilesRoot . '/CKEditorPlugins.js');
     // activate ckeditor
     \JS::activate('ckeditor');
     \JS::activate('jquery-cookie');
     // load language data
     $_ARRAYLANG = $objInit->loadLanguageData('FrontendEditing');
     $langVariables = array('TXT_FRONTEND_EDITING_SHOW_TOOLBAR' => $_ARRAYLANG['TXT_FRONTEND_EDITING_SHOW_TOOLBAR'], 'TXT_FRONTEND_EDITING_HIDE_TOOLBAR' => $_ARRAYLANG['TXT_FRONTEND_EDITING_HIDE_TOOLBAR'], 'TXT_FRONTEND_EDITING_PUBLISH' => $_ARRAYLANG['TXT_FRONTEND_EDITING_PUBLISH'], 'TXT_FRONTEND_EDITING_SUBMIT_FOR_RELEASE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_SUBMIT_FOR_RELEASE'], 'TXT_FRONTEND_EDITING_REFUSE_RELEASE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_REFUSE_RELEASE'], 'TXT_FRONTEND_EDITING_SAVE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_SAVE'], 'TXT_FRONTEND_EDITING_EDIT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_EDIT'], 'TXT_FRONTEND_EDITING_CANCEL_EDIT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_CANCEL_EDIT'], 'TXT_FRONTEND_EDITING_FINISH_EDIT_MODE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_FINISH_EDIT_MODE'], 'TXT_FRONTEND_EDITING_THE_DRAFT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_THE_DRAFT'], 'TXT_FRONTEND_EDITING_SAVE_CURRENT_STATE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_SAVE_CURRENT_STATE'], 'TXT_FRONTEND_EDITING_CONFIRM_BLOCK_SAVE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_CONFIRM_BLOCK_SAVE'], 'TXT_FRONTEND_EDITING_MODULE_PAGE' => $_ARRAYLANG['TXT_FRONTEND_EDITING_MODULE_PAGE'], 'TXT_FRONTEND_EDITING_NO_TITLE_AND_CONTENT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_NO_TITLE_AND_CONTENT'], 'TXT_FRONTEND_EDITING_CONFIRM_UNSAVED_EXIT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_CONFIRM_UNSAVED_EXIT'], 'TXT_FRONTEND_EDITING_DRAFT' => $_ARRAYLANG['TXT_FRONTEND_EDITING_DRAFT'], 'TXT_FRONTEND_EDITING_PUBLISHED' => $_ARRAYLANG['TXT_FRONTEND_EDITING_PUBLISHED']);
     // add toolbar to html
     $this->prepareTemplate($componentController);
     // assign js variables
     $contrexxJavascript = \ContrexxJavascript::getInstance();
     $contrexxJavascript->setVariable('langVars', $langVariables, 'FrontendEditing');
     $contrexxJavascript->setVariable('pageId', $page->getId(), 'FrontendEditing');
     $contrexxJavascript->setVariable('hasPublishPermission', \Permission::checkAccess(78, 'static', true), 'FrontendEditing');
     $contrexxJavascript->setVariable('contentTemplates', $this->getCustomContentTemplates(), 'FrontendEditing');
     $contrexxJavascript->setVariable('defaultTemplate', $this->getDefaultTemplate(), 'FrontendEditing');
     $configPath = ASCMS_PATH_OFFSET . substr(\Env::get('ClassLoader')->getFilePath(ASCMS_CORE_PATH . '/Wysiwyg/ckeditor.config.js.php'), strlen(ASCMS_DOCUMENT_ROOT));
     $contrexxJavascript->setVariable('configPath', $configPath . '?langId=' . FRONTEND_LANG_ID, 'FrontendEditing');
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:39,代码来源:FrontendController.class.php

示例7: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $_CORELANG, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $objKnowledge = new Knowledge(\Env::get('cx')->getPage()->getContent());
             \Env::get('cx')->getPage()->setContent($objKnowledge->getPage());
             if (!empty($objKnowledge->pageTitle)) {
                 \Env::get('cx')->getPage()->setTitle($objKnowledge->pageTitle);
                 \Env::get('cx')->getPage()->setContentTitle($objKnowledge->pageTitle);
                 \Env::get('cx')->getPage()->setMetaTitle($objKnowledge->pageTitle);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             if (file_exists($this->cx->getClassLoader()->getFilePath($this->getDirectory() . '/View/Style/backend.css'))) {
                 \JS::registerCSS(substr($this->getDirectory(false, true) . '/View/Style/backend.css', 1));
             }
             \Permission::checkAccess(129, 'static');
             $subMenuTitle = $_CORELANG['TXT_KNOWLEDGE'];
             $objKnowledge = new KnowledgeAdmin();
             $objKnowledge->getPage();
             break;
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:31,代码来源:ComponentController.class.php

示例8: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $subMenuTitle, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $objMediaDirectory = new MediaDirectory(\Env::get('cx')->getPage()->getContent(), $this->getName());
             $objMediaDirectory->pageTitle = \Env::get('cx')->getPage()->getTitle();
             $pageMetaTitle = \Env::get('cx')->getPage()->getMetatitle();
             $objMediaDirectory->metaTitle = $pageMetaTitle;
             \Env::get('cx')->getPage()->setContent($objMediaDirectory->getPage());
             if ($objMediaDirectory->getPageTitle() != '' && $objMediaDirectory->getPageTitle() != \Env::get('cx')->getPage()->getTitle()) {
                 \Env::get('cx')->getPage()->setTitle($objMediaDirectory->getPageTitle());
                 \Env::get('cx')->getPage()->setContentTitle($objMediaDirectory->getPageTitle());
                 \Env::get('cx')->getPage()->setMetaTitle($objMediaDirectory->getPageTitle());
             }
             if ($objMediaDirectory->getMetaTitle() != '') {
                 \Env::get('cx')->getPage()->setMetatitle($objMediaDirectory->getMetaTitle());
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(153, 'static');
             $subMenuTitle = $_CORELANG['TXT_MEDIADIR_MODULE'];
             $objMediaDirectory = new MediaDirectoryManager($this->getName());
             $objMediaDirectory->getPage();
             break;
         default:
             break;
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:36,代码来源:ComponentController.class.php

示例9: load

 /**
  * Load your component.
  *
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $subMenuTitle, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $objJobs = new Jobs(\Env::get('cx')->getPage()->getContent());
             \Env::get('cx')->getPage()->setContent($objJobs->getJobsPage());
             if ($page->getCmd() === 'details') {
                 $objJobs->getPageTitle(\Env::get('cx')->getPage()->getTitle());
                 \Env::get('cx')->getPage()->setTitle($objJobs->jobsTitle);
                 \Env::get('cx')->getPage()->setContentTitle($objJobs->jobsTitle);
                 \Env::get('cx')->getPage()->setMetaTitle($objJobs->jobsTitle);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(148, 'static');
             $subMenuTitle = $_CORELANG['TXT_JOBS_MANAGER'];
             $objJobsManager = new JobsManager();
             $objJobsManager->getJobsPage();
             break;
         default:
             break;
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:31,代码来源:ComponentController.class.php

示例10: __construct

 /**
  * DefaultController for the DefaultView
  * 
  * @param \Cx\Core\Core\Model\Entity\SystemComponentController $systemComponentController the system component controller object
  * @param \Cx\Core\Core\Controller\Cx                          $cx                        the cx object
  * @param \Cx\Core\Html\Sigma                                  $template                  the template object
  */
 public function __construct(\Cx\Core\Core\Model\Entity\SystemComponentController $systemComponentController, \Cx\Core\Core\Controller\Cx $cx)
 {
     //check the user permission
     \Permission::checkAccess(1030, 'static');
     parent::__construct($systemComponentController, $cx);
     $this->em = $this->cx->getDb()->getEntityManager();
     $this->crawlerRepository = $this->em->getRepository('Cx\\Core_Modules\\LinkManager\\Model\\Entity\\Crawler');
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:15,代码来源:DefaultController.class.php

示例11: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $_ARRAYLANG, $objTemplate;
     $subMenuTitle = $_ARRAYLANG['TXT_ALIAS_ADMINISTRATION'];
     $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
     $objTemplate = $this->cx->getTemplate();
     \Permission::checkAccess(115, 'static');
     $objAliasManager = new \Cx\Core_Modules\Alias\Controller\AliasManager();
     $objAliasManager->getPage();
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:15,代码来源:ComponentController.class.php

示例12: load

 /**
  * Load the component Stats.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $objTemplate, $_CORELANG;
     \Permission::checkAccess(163, 'static');
     $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
     $objTemplate = $this->cx->getTemplate();
     $subMenuTitle = $_CORELANG['TXT_STATISTIC'];
     $statistic = new \Cx\Core_Modules\Stats\Controller\Stats();
     $statistic->getContent();
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:15,代码来源:ComponentController.class.php

示例13: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $_ARRAYLANG;
     $subMenuTitle = $_ARRAYLANG['TXT_LANGUAGE_SETTINGS'];
     $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
     $cachedRoot = $this->cx->getTemplate()->getRoot();
     \Permission::checkAccess(22, 'static');
     $objLanguageManager = new \Cx\Core\LanguageManager\Controller\LanguageManager();
     $objLanguageManager->getLanguagePage();
     $this->cx->getTemplate()->setRoot($cachedRoot);
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:16,代码来源:ComponentController.class.php

示例14: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $_ARRAYLANG;
     $subMenuTitle = $_ARRAYLANG['TXT_SYSTEM_SETTINGS'];
     $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
     $cachedRoot = $this->cx->getTemplate()->getRoot();
     $this->cx->getTemplate()->setRoot($this->getDirectory() . '/View/Template/Backend');
     \Permission::checkAccess(17, 'static');
     $objConfig = new \Cx\Core\Config\Controller\Config();
     $objConfig->getPage();
     $this->cx->getTemplate()->setRoot($cachedRoot);
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:17,代码来源:ComponentController.class.php

示例15: load

 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $subMenuTitle, $_ARRAYLANG, $act, $objTemplate, $objDatabase, $objInit;
     $subMenuTitle = $_ARRAYLANG['TXT_CONTENT_HISTORY'];
     $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
     $cachedRoot = $this->cx->getTemplate()->getRoot();
     $this->cx->getTemplate()->setRoot($this->getDirectory() . '/View/Template/Backend');
     \Permission::checkAccess(21, 'static');
     $objViewManager = new \Cx\Core\ContentWorkflow\Controller\ContentWorkflow($act, $objTemplate, $objDatabase, $objInit);
     $objViewManager->getPage();
     $this->cx->getTemplate()->setRoot($cachedRoot);
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:17,代码来源:ComponentController.class.php


注:本文中的Permission::checkAccess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。