當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。