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


PHP BackendUserAuthentication::getTSConfig方法代码示例

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


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

示例1: getTCEMAIN_TSconfig

 /**
  * Return TSconfig for a page id
  *
  * @param int $tscPID Page id (PID) from which to get configuration.
  * @return array TSconfig array, if any
  */
 public function getTCEMAIN_TSconfig($tscPID)
 {
     if (!isset($this->cachedTSconfig[$tscPID])) {
         $this->cachedTSconfig[$tscPID] = $this->BE_USER->getTSConfig('TCEMAIN', BackendUtility::getPagesTSconfig($tscPID));
     }
     return $this->cachedTSconfig[$tscPID]['properties'];
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:13,代码来源:DataHandler.php

示例2: printDBClickMenu

 /**
  * Make 1st level clickmenu:
  *
  * @param string $table Table name
  * @param int $uid UID for the current record.
  * @return array the array to be returned as JSON
  */
 public function printDBClickMenu($table, $uid)
 {
     $uid = (int) $uid;
     // Get record:
     $this->rec = BackendUtility::getRecordWSOL($table, $uid);
     $menuItems = [];
     $root = 0;
     $DBmount = false;
     // Rootlevel
     if ($table === 'pages' && $uid === 0) {
         $root = 1;
     }
     // DB mount
     if ($table === 'pages' && in_array($uid, $this->backendUser->returnWebmounts())) {
         $DBmount = true;
     }
     // Used to hide cut,copy icons for l10n-records
     $l10nOverlay = false;
     // Should only be performed for overlay-records within the same table
     if (BackendUtility::isTableLocalizable($table) && $table !== 'pages_language_overlay') {
         $l10nOverlay = (int) $this->rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
     }
     // If record found (or root), go ahead and fill the $menuItems array which will contain data for the elements to render.
     if (is_array($this->rec) || $root) {
         // Get permissions
         $lCP = $this->backendUser->calcPerms(BackendUtility::getRecord('pages', $table === 'pages' ? (int) $this->rec['uid'] : (int) $this->rec['pid']));
         // View
         if (!in_array('view', $this->disabledItems, true)) {
             if ($table === 'pages') {
                 $menuItems['view'] = $this->DB_view($uid);
             }
             if ($table === 'tt_content') {
                 $ws_rec = BackendUtility::getRecordWSOL($table, (int) $this->rec['uid']);
                 $menuItems['view'] = $this->DB_view((int) $ws_rec['pid']);
             }
         }
         // Edit:
         if (!$root && ($this->backendUser->isPSet($lCP, $table, 'edit') || $this->backendUser->isPSet($lCP, $table, 'editcontent'))) {
             if (!in_array('edit', $this->disabledItems, true)) {
                 $menuItems['edit'] = $this->DB_edit($table, $uid);
             }
             $this->editOK = true;
         }
         // New:
         if (!in_array('new', $this->disabledItems, true) && $this->backendUser->isPSet($lCP, $table, 'new')) {
             $menuItems['new'] = $this->DB_new($table, $uid);
         }
         // Info:
         if (!in_array('info', $this->disabledItems, true) && !$root) {
             $menuItems['info'] = $this->DB_info($table, $uid);
         }
         $menuItems['spacer1'] = 'spacer';
         // Copy:
         if (!in_array('copy', $this->disabledItems, true) && !$root && !$DBmount && !$l10nOverlay) {
             $menuItems['copy'] = $this->DB_copycut($table, $uid, 'copy');
         }
         // Cut:
         if (!in_array('cut', $this->disabledItems, true) && !$root && !$DBmount && !$l10nOverlay && $this->editOK) {
             $menuItems['cut'] = $this->DB_copycut($table, $uid, 'cut');
         }
         // Paste:
         $elFromAllTables = count($this->clipObj->elFromTable(''));
         if (!in_array('paste', $this->disabledItems, true) && $elFromAllTables) {
             $selItem = $this->clipObj->getSelectedRecord();
             $elInfo = [GeneralUtility::fixed_lgd_cs($selItem['_RECORD_TITLE'], $this->backendUser->uc['titleLen']), $root ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] : GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $this->rec), $this->backendUser->uc['titleLen']), $this->clipObj->currentMode()];
             if ($table === 'pages' && $lCP & Permission::PAGE_NEW) {
                 if ($elFromAllTables) {
                     $menuItems['pasteinto'] = $this->DB_paste('', $uid, 'into', $elInfo);
                 }
             }
             $elFromTable = count($this->clipObj->elFromTable($table));
             if (!$root && !$DBmount && $elFromTable && $GLOBALS['TCA'][$table]['ctrl']['sortby']) {
                 $menuItems['pasteafter'] = $this->DB_paste($table, -$uid, 'after', $elInfo);
             }
         }
         // Delete:
         $elInfo = [GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $this->rec), $this->backendUser->uc['titleLen'])];
         $disableDeleteTS = $this->backendUser->getTSConfig('options.disableDelete');
         $disableDelete = (bool) trim(isset($disableDeleteTS['properties'][$table]) ? $disableDeleteTS['properties'][$table] : $disableDeleteTS['value']);
         if (!in_array('delete', $this->disabledItems, true) && !$root && !$DBmount && $this->backendUser->isPSet($lCP, $table, 'delete') && !$disableDelete) {
             $menuItems['spacer2'] = 'spacer';
             $menuItems['delete'] = $this->DB_delete($table, $uid, $elInfo);
         }
         if (!in_array('history', $this->disabledItems, true)) {
             $menuItems['history'] = $this->DB_history($table, $uid);
         }
         $localItems = [];
         if (!$this->cmLevel && !in_array('moreoptions', $this->disabledItems, true)) {
             // Creating menu items here:
             if ($this->editOK) {
                 $localItems['spacer3'] = 'spacer';
                 $localItems['moreoptions'] = $this->linkItem($this->label('more') . '&nbsp;&nbsp;<span class="fa fa-caret-right"></span>', '<span class="fa fa-fw"></span>', 'TYPO3.ClickMenu.fetch(' . GeneralUtility::quoteJSvalue(GeneralUtility::linkThisScript() . '&cmLevel=1&subname=moreoptions') . ');return false;', false, true);
                 $menuItemHideUnhideAllowed = false;
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


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