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


PHP BackendUserAuthentication::isPSet方法代码示例

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


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

示例1: printNewDBLevel

 /**
  * Make 2nd level clickmenu (only for DBmenus)
  *
  * @param string $table Table name
  * @param int $uid UID for the current record.
  * @return string HTML content
  */
 public function printNewDBLevel($table, $uid)
 {
     $localItems = [];
     $uid = (int) $uid;
     // Setting internal record to the table/uid :
     $this->rec = BackendUtility::getRecordWSOL($table, $uid);
     $menuItems = array();
     $root = 0;
     // Rootlevel
     if ($table === 'pages' && $uid === 0) {
         $root = 1;
     }
     // If record was found, check permissions and get menu items.
     if (is_array($this->rec) || $root) {
         $lCP = $this->backendUser->calcPerms(BackendUtility::getRecord('pages', $table === 'pages' ? (int) $this->rec['uid'] : (int) $this->rec['pid']));
         // Edit:
         if (!$root && ($this->backendUser->isPSet($lCP, $table, 'edit') || $this->backendUser->isPSet($lCP, $table, 'editcontent'))) {
             $this->editOK = true;
         }
         $menuItems = $this->processingByExtClassArray($menuItems, $table, $uid);
     }
     $subname = GeneralUtility::_GP('subname');
     if ($subname === 'moreoptions') {
         // If the page can be edited, then show this:
         if ($this->editOK) {
             if (($table === 'pages' || $table === 'tt_content') && !in_array('move_wizard', $this->disabledItems, true)) {
                 $localItems['move_wizard'] = $this->DB_moveWizard($table, $uid, $this->rec);
             }
             if (($table === 'pages' || $table === 'tt_content') && !in_array('new_wizard', $this->disabledItems, true)) {
                 $localItems['new_wizard'] = $this->DB_newWizard($table, $uid, $this->rec);
             }
             if ($table === 'pages' && !in_array('perms', $this->disabledItems, true) && $this->backendUser->check('modules', 'system_BeuserTxPermission')) {
                 $localItems['perms'] = $this->DB_perms($table, $uid, $this->rec);
             }
             if (!in_array('db_list', $this->disabledItems, true) && $this->backendUser->check('modules', 'web_list')) {
                 $localItems['db_list'] = $this->DB_db_list($table, $uid, $this->rec);
             }
         }
         // Temporary mount point item:
         if ($table === 'pages') {
             $localItems['temp_mount_point'] = $this->DB_tempMountPoint($uid);
         }
         // Merge the locally created items into the current menu items passed to this function.
         $menuItems = array_merge($menuItems, $localItems);
     }
     // Return the printed elements:
     if (!is_array($menuItems)) {
         $menuItems = array();
     }
     return $this->printItems($menuItems);
 }
开发者ID:vip3out,项目名称:TYPO3.CMS,代码行数:58,代码来源:ClickMenu.php


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