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


PHP ExtensionManager::extRelPath方法代码示例

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


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

示例1: initialize_editor

 /**
  * Initialize editor
  *
  * @param integer $pageId
  * @param integer $template_uid
  * @return integer
  * @todo Define visibility
  */
 public function initialize_editor($pageId, $template_uid = 0)
 {
     // Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
     global $tmpl, $tplRow, $theConstants;
     $tmpl = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
     // Defined global here!
     $tmpl->tt_track = 0;
     // Do not log time-performance information
     $tmpl->init();
     $tmpl->ext_localGfxPrefix = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('tstemplate_ceditor');
     $tmpl->ext_localWebGfxPrefix = $GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('tstemplate_ceditor');
     // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
     $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
     // IF there was a template...
     if (is_array($tplRow)) {
         // Gets the rootLine
         $sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
         $rootLine = $sys_page->getRootLine($pageId);
         // This generates the constants/config + hierarchy info for the template.
         $tmpl->runThroughTemplates($rootLine, $template_uid);
         // The editable constants are returned in an array.
         $theConstants = $tmpl->generateConfig_constants();
         // The returned constants are sorted in categories, that goes into the $tmpl->categories array
         $tmpl->ext_categorizeEditableConstants($theConstants);
         // This array will contain key=[expanded constantname], value=linenumber in template. (after edit_divider, if any)
         $tmpl->ext_regObjectPositions($tplRow['constants']);
         return 1;
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:37,代码来源:TypoScriptTemplateConstantEditorModuleFunctionController.php

示例2: initialize

 /**
  * Initializes the Module
  *
  * @return 	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('recycler');
     $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
     //don't access in workspace
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $this->isAccessibleForCurrentUser = FALSE;
     }
     //read configuration
     $modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
     if ($this->isCurrentUserAdmin()) {
         $this->allowDelete = TRUE;
     } else {
         $this->allowDelete = $modTS['properties']['allowDelete'] == '1';
     }
     if (isset($modTS['properties']['recordsPageLimit']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
         $this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:31,代码来源:RecyclerModuleController.php

示例3: render

 /**
  * Renders the icon
  *
  * @param string $icon Icon to be used
  * @param string $title Optional title
  * @return strin Content rendered image
  */
 public function render($icon, $title = '')
 {
     if (!empty($icon)) {
         $absIconPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($icon);
         if (file_exists($absIconPath)) {
             $icon = $GLOBALS['BACK_PATH'] . '../' . str_replace(PATH_site, '', $absIconPath);
         }
     } else {
         $icon = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('reports') . 'Resources/Public/moduleicon.gif';
     }
     $content = '<img' . \t3lib_iconworks::skinImg($GLOBALS['BACK_PATH'], $icon, 'width="16" height="16"') . ' title="' . htmlspecialchars($title) . '" alt="' . htmlspecialchars($title) . '" />';
     return $content;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:20,代码来源:IconViewHelper.php

示例4: main

    /**
     * Main Task center module
     *
     * @return string HTML content.
     * @todo Define visibility
     */
    public function main()
    {
        if ($id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('display')) {
            return $this->urlInIframe($this->backPath . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('impexp') . 'app/index.php?tx_impexp[action]=export&preset[load]=1&preset[select]=' . $id, 1);
        } else {
            // Thumbnail folder and files:
            $tempDir = $this->userTempFolder();
            if ($tempDir) {
                $thumbnails = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($tempDir, 'png,gif,jpg', 1);
            }
            $clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
            $usernames = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
            // Create preset links:
            $presets = $this->getPresets();
            $opt = array();
            $opt[] = '
			<tr class="bgColor5 tableheader">
				<td>Icon:</td>
				<td>Preset Title:</td>
				<td>Public</td>
				<td>Owner:</td>
				<td>Page:</td>
				<td>Path:</td>
				<td>Meta data:</td>
			</tr>';
            if (is_array($presets)) {
                foreach ($presets as $presetCfg) {
                    $configuration = unserialize($presetCfg['preset_data']);
                    $thumbnailFile = $thumbnails[$configuration['meta']['thumbnail']];
                    $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '[' . $presetCfg['uid'] . ']';
                    $opt[] = '
					<tr class="bgColor4">
						<td>' . ($thumbnailFile ? '<img src="' . $this->backPath . '../' . substr($tempDir, strlen(PATH_site)) . basename($thumbnailFile) . '" hspace="2" width="70" style="border: solid black 1px;" alt="" /><br />' : '&nbsp;') . '</td>
						<td nowrap="nowrap"><a href="index.php?SET[function]=tx_impexp&display=' . $presetCfg['uid'] . '">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($title, 30)) . '</a>&nbsp;</td>
						<td>' . ($presetCfg['public'] ? 'Yes' : '&nbsp;') . '</td>
						<td>' . ($presetCfg['user_uid'] === $GLOBALS['BE_USER']->user['uid'] ? 'Own' : '[' . $usernames[$presetCfg['user_uid']]['username'] . ']') . '</td>
						<td>' . ($configuration['pagetree']['id'] ? $configuration['pagetree']['id'] : '&nbsp;') . '</td>
						<td>' . htmlspecialchars($configuration['pagetree']['id'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($configuration['pagetree']['id'], $clause, 20) : '[Single Records]') . '</td>
						<td>
							<strong>' . htmlspecialchars($configuration['meta']['title']) . '</strong><br />' . htmlspecialchars($configuration['meta']['description']) . ($configuration['meta']['notes'] ? '<br /><br /><strong>Notes:</strong> <em>' . htmlspecialchars($configuration['meta']['notes']) . '</em>' : '') . '
						</td>
					</tr>';
                }
                $content = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding">' . implode('', $opt) . '</table>';
            }
        }
        // Output:
        $theOutput .= $this->pObj->doc->spacer(5);
        $theOutput .= $this->pObj->doc->section('Export presets', $content, 0, 1);
        return $theOutput;
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:57,代码来源:ModuleFunctionController.php

示例5: showInstallToolEnableRequest

 /**
  * Shows warning message about ENABLE_INSTALL_TOOL file and a button to create this file
  *
  * @return void
  */
 protected function showInstallToolEnableRequest()
 {
     // Create instance of object for output of data
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('install') . 'mod/mod_template.html');
     $this->doc->form = '<form method="post" id="t3-install-form-unlock" action="">';
     $this->doc->addStyleSheet('install', 'stylesheets/install/install.css');
     $this->doc->addStyleSheet('mod-install', \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('install') . 'mod/mod_styles.css');
     $markers = $buttons = array();
     $markers['CONTENT'] = $this->renderMessage();
     $content = $this->doc->moduleBody('', $buttons, $markers);
     $this->doc->postCode = '<input type="hidden" name="enableInstallTool" value="1" />' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('installToolEnableToken');
     echo $this->doc->render('', $content);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:19,代码来源:InstallToolModuleController.php

示例6: init

    /**
     * Initialization
     *
     * @return 	void
     * @todo Define visibility
     */
    public function init()
    {
        $this->MCONF = $GLOBALS['MCONF'];
        $this->menuConfig();
        $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->form = '<form action="" method="post">';
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('indexed_search') . '/mod/mod_template.html');
        // JavaScript
        $this->doc->JScodeArray['indexed_search'] = '
			script_ended = 0;
			function jumpToUrl(URL) {
				window.location.href = URL;
			}';
        $this->doc->tableLayout = array('defRow' => array('0' => array('<td valign="top" nowrap>', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width=10 height=1></td><td valign="top" nowrap>', '</td>')));
        $indexer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
        $indexer->initializeExternalParsers();
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:ModuleController.php

示例7: moduleContent

 /**
  * Generates the module content
  *
  * @return void
  * @todo Define visibility
  */
 public function moduleContent()
 {
     switch ((string) $this->MOD_SETTINGS['function']) {
         case 1:
             $content = '<div align="left"><strong>' . $GLOBALS['LANG']->getLL('referenceExplanation') . '</strong></div>';
             $content .= '<p>' . $GLOBALS['LANG']->getLL('referenceExplanationDetailed') . '</p><br />';
             $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('displayReferences'), $content, 0, 1);
             $this->content .= '<a href="#" onclick="vHWin=window.open(\'' . $GLOBALS['BACK_PATH'] . 'wizard_tsconfig.php?mode=tsref&amp;P[formName]=editForm\',\'popUp\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;" title="TSref reference">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-typoscript-documentation-open') . 'TSREF</a><br />';
             $this->content .= '<a href="#" onclick="vHWin=window.open(\'' . $GLOBALS['BACK_PATH'] . 'wizard_tsconfig.php?mode=beuser&amp;P[formName]=editForm\',\'popUp\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;" title="TSref reference">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-typoscript-documentation-open') . 'USER TSCONFIG</a><br />';
             $this->content .= '<a href="#" onclick="vHWin=window.open(\'' . $GLOBALS['BACK_PATH'] . 'wizard_tsconfig.php?mode=page&amp;P[formName]=editForm\',\'popUp\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;" title="TSref reference">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-typoscript-documentation-open') . 'PAGE TSCONFIG</a><br />';
             break;
         case 2:
             if ($GLOBALS['BE_USER']->user['admin']) {
                 if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_rebuild')) {
                     // remove all data from the database
                     $this->purgeSQLContents();
                     // get all loaded extension keys
                     $extArray = $GLOBALS['TYPO3_LOADED_EXT'];
                     $content = '<div align="left"><strong>' . $GLOBALS['LANG']->getLL('loadedTSfrom') . '</strong></div><br />';
                     // parse the extension names only (no need for all details from the TYPO3_LOADED_EXT table
                     foreach ($extArray as $extName => $dummy) {
                         // check that the extension is really loaded (which should always be the case)
                         if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded($extName)) {
                             // extract the content.xml from the manual.sxw ZIP file
                             $manual = $this->getZIPFileContents(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath($extName) . 'doc/manual.sxw', 'content.xml');
                             // check if the manual file actually exists and if the content.xml could be loaded
                             if ($manual != '') {
                                 // if the manual file exists, proceed with the load into the SQL database
                                 $content .= '<p>Extension ' . $extName . '...';
                                 // run the extraction processing and import the data into SQL. Return the number of TS tables found in the open office document
                                 $number = $this->loadExtensionManual($extName, $manual);
                                 // print a status message with a link to the openoffice manual
                                 $content .= $number . ' ' . $GLOBALS['LANG']->getLL('sections') . ' (<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($extName) . 'doc/manual.sxw">manual</a>)</p>';
                             }
                         } else {
                             // This should never happen!
                             die('Fatal error : loaded extension not actually loaded? Please file a bug report at http://forge.typo3.org!');
                         }
                     }
                     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('rebuildTS'), $content . '<br />', 0, 1);
                     // Issue warnings about duplicate or empty obj_strings, if any
                     // An obj_string should be unique. It should appear in only one extension manual and then only once
                     // If the sum of all occurrences of a given obj_string is more than one, issue a list of duplicate entries as a warning
                     $duplicateWarnings = '';
                     $emptyWarnings = '';
                     foreach ($this->objStringsPerExtension as $obj_string => $extensions) {
                         if (empty($obj_string)) {
                             $emptyWarnings = '<p class="typo3-red">' . $GLOBALS['LANG']->getLL('warning_manualsWithoutMarkers');
                             foreach ($extensions as $extensionKey => $counter) {
                                 $emptyWarnings .= ' ' . $extensionKey . ' (' . $counter . ')<br />';
                             }
                             $emptyWarnings .= '</p><br />';
                         } else {
                             if (array_sum($extensions) > 1) {
                                 $duplicateWarnings .= $obj_string . ':';
                                 foreach ($extensions as $extensionKey => $counter) {
                                     $duplicateWarnings .= ' ' . $extensionKey . ' (' . $counter . ')';
                                 }
                                 $duplicateWarnings .= '<br />';
                             }
                         }
                     }
                     $warnings = $emptyWarnings;
                     if (!empty($duplicateWarnings)) {
                         $warnings .= '<p class="typo3-red">' . $GLOBALS['LANG']->getLL('warning_duplicateMarkers') . '<br />' . $duplicateWarnings . '</p>';
                     }
                     if (!empty($warnings)) {
                         $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('updateWarnings'), '<div>' . $warnings . '</div>', 0, 1);
                     }
                 }
                 $content = '<p>' . $GLOBALS['LANG']->getLL('rebuildExplanation') . '</p><br />';
                 $content .= $GLOBALS['LANG']->getLL('rebuild') . ' <input type="submit" name="_rebuild" value="Rebuild" /><br />';
                 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('rebuildTS'), $content, 0, 1);
             } else {
                 $this->content .= '<p>' . $GLOBALS['LANG']->getLL('adminAccessOnly') . '</p><br />';
             }
             break;
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:85,代码来源:TypoScriptConfigHelpModuleController.php

示例8: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// Add static template for Click-enlarge rendering
\TYPO3\CMS\Core\Extension\ExtensionManager::addStaticFile($_EXTKEY, 'static/clickenlarge/', 'Clickenlarge Rendering');
// Add configuration of soft references on image tags in RTE content
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'hooks/softref/ext_tables.php';
// Add acronyms table
$GLOBALS['TCA']['tx_rtehtmlarea_acronym'] = array('ctrl' => array('title' => 'LLL:EXT:rtehtmlarea/locallang_db.xml:TYPO3\\CMS\\Rtehtmlarea\\Extension\\Acronym', 'label' => 'term', 'default_sortby' => 'ORDER BY term', 'sortby' => 'sorting', 'delete' => 'deleted', 'enablecolumns' => array('disabled' => 'hidden', 'starttime' => 'starttime', 'endtime' => 'endtime'), 'dynamicConfigFile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'tca.php', 'iconfile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($_EXTKEY) . 'extensions/Acronym/skin/images/acronym.gif'));
\TYPO3\CMS\Core\Extension\ExtensionManager::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
\TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('tx_rtehtmlarea_acronym', 'EXT:' . $_EXTKEY . '/locallang_csh_abbreviation.xml');
// Add contextual help files
$htmlAreaRteContextHelpFiles = array('General' => 'EXT:' . $_EXTKEY . '/locallang_csh.xlf', 'Acronym' => 'EXT:' . $_EXTKEY . '/extensions/Acronym/locallang_csh.xlf', 'EditElement' => 'EXT:' . $_EXTKEY . '/extensions/EditElement/locallang_csh.xlf', 'Language' => 'EXT:' . $_EXTKEY . '/extensions/Language/locallang_csh.xlf', 'MicrodataSchema' => 'EXT:' . $_EXTKEY . '/extensions/MicrodataSchema/locallang_csh.xlf', 'PlainText' => 'EXT:' . $_EXTKEY . '/extensions/PlainText/locallang_csh.xlf', 'RemoveFormat' => 'EXT:' . $_EXTKEY . '/extensions/RemoveFormat/locallang_csh.xlf', 'TableOperations' => 'EXT:' . $_EXTKEY . '/extensions/TableOperations/locallang_csh.xlf');
foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
    \TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $key, $file);
}
unset($htmlAreaRteContextHelpFiles);
// Extend TYPO3 User Settings Configuration
if (TYPO3_MODE === 'BE' && \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('setup') && is_array($GLOBALS['TYPO3_USER_SETTINGS'])) {
    $GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge($GLOBALS['TYPO3_USER_SETTINGS']['columns'], array('rteWidth' => array('type' => 'text', 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteWidth', 'csh' => 'xEXT_rtehtmlarea_General:rteWidth'), 'rteHeight' => array('type' => 'text', 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteHeight', 'csh' => 'xEXT_rtehtmlarea_General:rteHeight'), 'rteResize' => array('type' => 'check', 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteResize', 'csh' => 'xEXT_rtehtmlarea_General:rteResize'), 'rteMaxHeight' => array('type' => 'text', 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteMaxHeight', 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight'), 'rteCleanPasteBehaviour' => array('type' => 'select', 'label' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:rteCleanPasteBehaviour', 'items' => array('plainText' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:plainText', 'pasteStructure' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:pasteStructure', 'pasteFormat' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:pasteFormat'), 'csh' => 'xEXT_rtehtmlarea_PlainText:behaviour')));
    $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xml:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
}
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:ext_tables.php

示例9: indexAction

 /**
  * Shows an overview list of available reports.
  *
  * @return string List of available reports
  */
 protected function indexAction()
 {
     $content = '';
     $tasks = array();
     $icon = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('taskcenter') . 'task/task.gif';
     // Render the tasks only if there are any available
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) && count($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) > 0) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'] as $extKey => $extensionReports) {
             foreach ($extensionReports as $taskClass => $task) {
                 if (!$this->checkAccess($extKey, $taskClass)) {
                     continue;
                 }
                 $link = 'mod.php?M=user_task&SET[function]=' . $extKey . '.' . $taskClass;
                 $taskTitle = $GLOBALS['LANG']->sL($task['title']);
                 $taskDescriptionHtml = '';
                 // Check for custom icon
                 if (!empty($task['icon'])) {
                     $icon = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($task['icon']);
                 }
                 if (class_exists($taskClass)) {
                     $taskInstance = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($taskClass, $this);
                     if ($taskInstance instanceof \TYPO3\CMS\Taskcenter\TaskInterface) {
                         $taskDescriptionHtml = $taskInstance->getOverview();
                     }
                 }
                 // Generate an array of all tasks
                 $uniqueKey = $this->getUniqueKey($extKey . '.' . $taskClass);
                 $tasks[$uniqueKey] = array('title' => $taskTitle, 'descriptionHtml' => $taskDescriptionHtml, 'description' => $GLOBALS['LANG']->sL($task['description']), 'icon' => $icon, 'link' => $link, 'uid' => $extKey . '.' . $taskClass);
             }
         }
         $content .= $this->renderListMenu($tasks, TRUE);
     } else {
         $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('no-tasks', TRUE), '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
         $this->content .= $flashMessage->render();
     }
     return $content;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:42,代码来源:TaskModuleController.php

示例10: makeControl

    /**
     * Creates the control panel for a single record in the listing.
     *
     * @param string $table The table
     * @param array $row The record for which to make the control panel.
     * @return string HTML table with the control panel (unless disabled)
     * @todo Define visibility
     */
    public function makeControl($table, $row)
    {
        if ($this->dontShowClipControlPanels) {
            return '';
        }
        $rowUid = $row['uid'];
        if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('version') && isset($row['_ORIG_uid'])) {
            $rowUid = $row['_ORIG_uid'];
        }
        // Initialize:
        \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
        $cells = array();
        // If the listed table is 'pages' we have to request the permission settings for each page:
        if ($table == 'pages') {
            $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $row['uid']));
        }
        // This expresses the edit permissions for this particular element:
        $permsEdit = $table == 'pages' && $localCalcPerms & 2 || $table != 'pages' && $this->calcPerms & 16;
        // "Show" link (only pages and tt_content elements)
        if ($table == 'pages' || $table == 'tt_content') {
            $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
            $cells['view'] = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid'], $this->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
        } elseif (!$this->table) {
            $cells['view'] = $this->spaceIcon;
        }
        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
        if ($permsEdit) {
            $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
            $cells['edit'] = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $this->backPath, -1)) . '" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' . ($GLOBALS['TCA'][$table]['ctrl']['readOnly'] ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open-read-only') : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open')) . '</a>';
        } elseif (!$this->table) {
            $cells['edit'] = $this->spaceIcon;
        }
        // "Move" wizard link for pages/tt_content elements:
        if ($table == 'tt_content' && $permsEdit || $table == 'pages') {
            $cells['move'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'move_el.php?table=' . $table . '&uid=' . $row['uid'] . '\');') . '" title="' . $GLOBALS['LANG']->getLL('move_' . ($table == 'tt_content' ? 'record' : 'page'), TRUE) . '">' . ($table == 'tt_content' ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-move') : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-page-move')) . '</a>';
        } elseif (!$this->table) {
            $cells['move'] = $this->spaceIcon;
        }
        // If the extended control panel is enabled OR if we are seeing a single table:
        if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table) {
            // "Info": (All records)
            $cells['viewBig'] = '<a href="#" onclick="' . htmlspecialchars('top.launchView(\'' . $table . '\', \'' . $row['uid'] . '\'); return false;') . '" title="' . $GLOBALS['LANG']->getLL('showInfo', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-info') . '</a>';
            // If the table is NOT a read-only table, then show these links:
            if (!$GLOBALS['TCA'][$table]['ctrl']['readOnly']) {
                // "Revert" link (history/undo)
                $cells['history'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'show_rechis.php?element=' . rawurlencode($table . ':' . $row['uid']) . '\',\'#latest\');') . '" title="' . $GLOBALS['LANG']->getLL('history', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-history-open') . '</a>';
                // Versioning:
                if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('version') && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
                    $vers = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord($table, $row['uid'], 'uid', $GLOBALS['BE_USER']->workspace, FALSE, $row);
                    // If table can be versionized.
                    if (is_array($vers)) {
                        $versionIcon = 'no-version';
                        if (count($vers) > 1) {
                            $versionIcon = count($vers) - 1;
                        }
                        $cells['version'] = '<a href="' . htmlspecialchars($this->backPath . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version') . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . rawurlencode($row['uid'])) . '" title="' . $GLOBALS['LANG']->getLL('displayVersions', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-version-' . $versionIcon) . '</a>';
                    } elseif (!$this->table) {
                        $cells['version'] = $this->spaceIcon;
                    }
                }
                // "Edit Perms" link:
                if ($table == 'pages' && $GLOBALS['BE_USER']->check('modules', 'web_perm') && \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('perm')) {
                    $cells['perms'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('perm') . 'mod1/index.php' . '?id=' . $row['uid'] . '&return_id=' . $row['uid'] . '&edit=1') . '" title="' . $GLOBALS['LANG']->getLL('permissions', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-locked') . '</a>';
                } elseif (!$this->table && $GLOBALS['BE_USER']->check('modules', 'web_perm')) {
                    $cells['perms'] = $this->spaceIcon;
                }
                // "New record after" link (ONLY if the records in the table are sorted by a "sortby"-row or if default values can depend on previous record):
                if ($GLOBALS['TCA'][$table]['ctrl']['sortby'] || $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues']) {
                    if ($table != 'pages' && $this->calcPerms & 16 || $table == 'pages' && $this->calcPerms & 8) {
                        if ($this->showNewRecLink($table)) {
                            $params = '&edit[' . $table . '][' . -($row['_MOVE_PLH'] ? $row['_MOVE_PLH_uid'] : $row['uid']) . ']=new';
                            $cells['new'] = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $this->backPath, -1)) . '" title="' . $GLOBALS['LANG']->getLL('new' . ($table == 'pages ' ? 'Page' : 'Record'), TRUE) . '">' . ($table == 'pages' ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-page-new') : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-new')) . '</a>';
                        }
                    }
                } elseif (!$this->table) {
                    $cells['new'] = $this->spaceIcon;
                }
                // "Up/Down" links
                if ($permsEdit && $GLOBALS['TCA'][$table]['ctrl']['sortby'] && !$this->sortField && !$this->searchLevels) {
                    if (isset($this->currentTable['prev'][$row['uid']])) {
                        // Up
                        $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prev'][$row['uid']];
                        $cells['moveUp'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('moveUp', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-move-up') . '</a>';
                    } else {
                        $cells['moveUp'] = $this->spaceIcon;
                    }
                    if ($this->currentTable['next'][$row['uid']]) {
                        // Down
                        $params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['next'][$row['uid']];
                        $cells['moveDown'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('moveDown', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-move-down') . '</a>';
                    } else {
                        $cells['moveDown'] = $this->spaceIcon;
//.........这里部分代码省略.........
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:101,代码来源:DatabaseRecordList.php

示例11: renderQuickEdit


//.........这里部分代码省略.........
            $trData->fetchRecord($this->eRParts[0], $uidVal == 'new' ? $this->id : $uidVal, $uidVal);
            // Getting/Making the record:
            reset($trData->regTableItems_data);
            $rec = current($trData->regTableItems_data);
            if ($uidVal == 'new') {
                $new_unique_uid = uniqid('NEW');
                $rec['uid'] = $new_unique_uid;
                $rec['pid'] = intval($ex_pid) ? intval($ex_pid) : $this->id;
                $recordAccess = TRUE;
            } else {
                $rec['uid'] = $uidVal;
                // Checking internals access:
                $recordAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($this->eRParts[0], $uidVal);
            }
            if (!$recordAccess) {
                // If no edit access, print error message:
                $content .= $this->doc->section($GLOBALS['LANG']->getLL('noAccess'), $GLOBALS['LANG']->getLL('noAccess_msg') . '<br /><br />' . ($GLOBALS['BE_USER']->errorMsg ? 'Reason: ' . $GLOBALS['BE_USER']->errorMsg . '<br /><br />' : ''), 0, 1);
            } elseif (is_array($rec)) {
                // If the record is an array (which it will always be... :-)
                // Create instance of TCEforms, setting defaults:
                $tceforms = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
                $tceforms->backPath = $GLOBALS['BACK_PATH'];
                $tceforms->initDefaultBEMode();
                $tceforms->fieldOrder = $this->modTSconfig['properties']['tt_content.']['fieldOrder'];
                $tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
                $tceforms->disableRTE = $this->MOD_SETTINGS['disableRTE'];
                $tceforms->enableClickMenu = TRUE;
                // Clipboard is initialized:
                // Start clipboard
                $tceforms->clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                // Initialize - reads the clipboard content from the user session
                $tceforms->clipObj->initializeClipboard();
                if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp'] !== 'text' && $this->MOD_SETTINGS['showDescriptions']) {
                    $tceforms->edit_showFieldHelp = 'text';
                }
                // Render form, wrap it:
                $panel = '';
                $panel .= $tceforms->getMainFields($this->eRParts[0], $rec);
                $panel = $tceforms->wrapTotal($panel, $rec, $this->eRParts[0]);
                // Add hidden fields:
                $theCode = $panel;
                if ($uidVal == 'new') {
                    $theCode .= '<input type="hidden" name="data[' . $this->eRParts[0] . '][' . $rec['uid'] . '][pid]" value="' . $rec['pid'] . '" />';
                }
                $theCode .= '
					<input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />
					<input type="hidden" name="_disableRTE" value="' . $tceforms->disableRTE . '" />
					<input type="hidden" name="edit_record" value="' . $edit_record . '" />
					<input type="hidden" name="redirect" value="' . htmlspecialchars($uidVal == 'new' ? \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('cms') . 'layout/db_layout.php?id=' . $this->id . '&new_unique_uid=' . $new_unique_uid . '&returnUrl=' . rawurlencode($this->returnUrl) : $this->R_URI) . '" />
					' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction');
                // Add JavaScript as needed around the form:
                $theCode = $tceforms->printNeededJSFunctions_top() . $theCode . $tceforms->printNeededJSFunctions();
                // Add warning sign if record was "locked":
                if ($lockInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::isRecordLocked($this->eRParts[0], $rec['uid'])) {
                    $lockedMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($lockInfo['msg']), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
                    \TYPO3\CMS\Core\Messaging\FlashMessageQueue::addMessage($lockedMessage);
                }
                // Add whole form as a document section:
                $content .= $this->doc->section('', $theCode);
            }
        } else {
            // If no edit access, print error message:
            $content .= $this->doc->section($GLOBALS['LANG']->getLL('noAccess'), $GLOBALS['LANG']->getLL('noAccess_msg') . '<br /><br />', 0, 1);
        }
        // Bottom controls (function menus):
        $q_count = $this->getNumberOfHiddenElements();
        $h_func_b = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($GLOBALS['LANG']->getLL('hiddenCE', 1)) : $GLOBALS['LANG']->getLL('hiddenCE', 1) . ' (' . $q_count . ')') . '</label>';
        $h_func_b .= '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'db_layout.php', '', 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPalettes', 1) . '</label>';
        if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('context_help') && $GLOBALS['BE_USER']->uc['edit_showFieldHelp'] !== 'text') {
            $h_func_b .= '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[showDescriptions]', $this->MOD_SETTINGS['showDescriptions'], 'db_layout.php', '', 'id="checkShowDescriptions"') . '<label for="checkShowDescriptions">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showDescriptions', 1) . '</label>';
        }
        if ($GLOBALS['BE_USER']->isRTE()) {
            $h_func_b .= '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[disableRTE]', $this->MOD_SETTINGS['disableRTE'], 'db_layout.php', '', 'id="checkDisableRTE"') . '<label for="checkDisableRTE">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.disableRTE', 1) . '</label>';
        }
        // Add the function menus to bottom:
        $content .= $this->doc->section('', $h_func_b, 0, 0);
        $content .= $this->doc->spacer(10);
        // Select element matrix:
        if ($this->eRParts[0] == 'tt_content' && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->eRParts[1])) {
            $posMap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('ext_posMap');
            $posMap->backPath = $GLOBALS['BACK_PATH'];
            $posMap->cur_sys_language = $this->current_sys_language;
            $HTMLcode = '';
            // CSH:
            $HTMLcode .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem($this->descrTable, 'quickEdit_selElement', $GLOBALS['BACK_PATH'], '|<br />');
            $HTMLcode .= $posMap->printContentElementColumns($this->id, $this->eRParts[1], $this->colPosList, $this->MOD_SETTINGS['tt_content_showHidden'], $this->R_URI);
            $content .= $this->doc->spacer(20);
            $content .= $this->doc->section($GLOBALS['LANG']->getLL('CEonThisPage'), $HTMLcode, 0, 1);
            $content .= $this->doc->spacer(20);
        }
        // Finally, if comments were generated in TCEforms object, print these as a HTML comment:
        if (count($tceforms->commentMessages)) {
            $content .= '
	<!-- TCEFORM messages
	' . htmlspecialchars(implode(LF, $tceforms->commentMessages)) . '
	-->
	';
        }
        return $content;
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:101,代码来源:PageLayoutController.php

示例12: array

				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
			'), (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER => array('showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
					--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;titleonly,
				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
					--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
					--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
		'), (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER => array('showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
					--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;titleonly,
				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
					--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
				--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
		')), 'palettes' => array('5' => array('showitem' => 'author,author_email', 'canNotCollapse' => TRUE), 'standard' => array('showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid', 'canNotCollapse' => 1), 'shortcut' => array('showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid, shortcut_mode;LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode_formlabel', 'canNotCollapse' => 1), 'shortcutpage' => array('showitem' => 'shortcut;LLL:EXT:cms/locallang_tca.xml:pages.shortcut_formlabel', 'canNotCollapse' => 1), 'external' => array('showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid, urltype;LLL:EXT:cms/locallang_tca.xml:pages.urltype_formlabel, url;LLL:EXT:cms/locallang_tca.xml:pages.url_formlabel', 'canNotCollapse' => 1), 'title' => array('showitem' => 'title;LLL:EXT:cms/locallang_tca.xml:pages.title_formlabel, --linebreak--, nav_title;LLL:EXT:cms/locallang_tca.xml:pages.nav_title_formlabel, --linebreak--, subtitle;LLL:EXT:cms/locallang_tca.xml:pages.subtitle_formlabel', 'canNotCollapse' => 1), 'titleonly' => array('showitem' => 'title;LLL:EXT:cms/locallang_tca.xml:pages.title_formlabel', 'canNotCollapse' => 1), 'hiddenonly' => array('showitem' => 'hidden;LLL:EXT:cms/locallang_tca.xml:pages.hidden_formlabel', 'canNotCollapse' => 1), 'access' => array('showitem' => 'starttime;LLL:EXT:cms/locallang_tca.xml:pages.starttime_formlabel, endtime;LLL:EXT:cms/locallang_tca.xml:pages.endtime_formlabel', 'canNotCollapse' => 1), 'abstract' => array('showitem' => 'abstract;LLL:EXT:cms/locallang_tca.xml:pages.abstract_formlabel', 'canNotCollapse' => 1), 'metatags' => array('showitem' => 'keywords;LLL:EXT:cms/locallang_tca.xml:pages.keywords_formlabel, --linebreak--, description;LLL:EXT:cms/locallang_tca.xml:pages.description_formlabel', 'canNotCollapse' => 1), 'editorial' => array('showitem' => 'author;LLL:EXT:cms/locallang_tca.xml:pages.author_formlabel, author_email;LLL:EXT:cms/locallang_tca.xml:pages.author_email_formlabel', 'canNotCollapse' => 1), 'language' => array('showitem' => 'l18n_cfg;LLL:EXT:cms/locallang_tca.xml:pages.l18n_cfg_formlabel', 'canNotCollapse' => 1), 'media' => array('showitem' => 'media;LLL:EXT:cms/locallang_tca.xml:pages.media_formlabel', 'canNotCollapse' => 1)));
// Keep old code (pre-FAL) for installations that haven't upgraded yet.
// @deprecated since TYPO3 6.0, please remove in TYPO3 7.0
// existing installation - and files are merged, nothing to do
if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['Tx_Install_Updates_File_TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['Tx_Install_Updates_File_TceformsUpdateWizard'], 'pages_language_overlay:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
    \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[pages_language_overlay][columns][media] yet. Please do so before TYPO3 v7.');
    // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
    $TCA['pages_language_overlay']['columns']['media']['config'] = array('type' => 'group', 'internal_type' => 'file', 'allowed' => $TCA['pages']['columns']['media']['config']['allowed'], 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], 'uploadfolder' => 'uploads/media', 'show_thumbs' => '1', 'size' => '3', 'maxitems' => '100', 'minitems' => '0');
}
// sys_template
$TCA['sys_template'] = array('ctrl' => $TCA['sys_template']['ctrl'], 'interface' => array('showRecordFieldList' => 'title,clear,root,basedOn,nextLevel,sitetitle,description,hidden,starttime,endtime'), 'columns' => array('title' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.title', 'config' => array('type' => 'input', 'size' => '25', 'max' => '256', 'eval' => 'required')), 'hidden' => array('label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable', 'exclude' => 1, 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime', 'exclude' => 1, 'config' => array('type' => 'input', 'size' => '13', 'max' => '20', 'eval' => 'datetime', 'default' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime', 'exclude' => 1, 'config' => array('type' => 'input', 'size' => '13', 'max' => '20', 'eval' => 'datetime', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020)))), 'root' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.root', 'config' => array('type' => 'check')), 'clear' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.clear', 'config' => array('type' => 'check', 'items' => array(array('Constants', ''), array('Setup', '')), 'cols' => 2)), 'sitetitle' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.sitetitle', 'config' => array('type' => 'input', 'size' => '25', 'max' => '256')), 'constants' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.constants', 'config' => array('type' => 'text', 'cols' => '48', 'rows' => '10', 'wrap' => 'OFF', 'softref' => 'TStemplate,email[subst],url[subst]'), 'defaultExtras' => 'fixed-font : enable-tab'), 'nextLevel' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.nextLevel', 'config' => array('type' => 'group', 'internal_type' => 'db', 'allowed' => 'sys_template', 'show_thumbs' => '1', 'size' => '1', 'maxitems' => '1', 'minitems' => '0', 'default' => '', 'wizards' => array('suggest' => array('type' => 'suggest')))), 'include_static_file' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.include_static_file', 'config' => array('type' => 'select', 'size' => 10, 'maxitems' => 100, 'items' => array(), 'softref' => 'ext_fileref')), 'basedOn' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.basedOn', 'config' => array('type' => 'group', 'internal_type' => 'db', 'allowed' => 'sys_template', 'show_thumbs' => '1', 'size' => '3', 'maxitems' => '50', 'autoSizeMax' => 10, 'minitems' => '0', 'default' => '', 'wizards' => array('_PADDING' => 4, '_VERTICAL' => 1, 'suggest' => array('type' => 'suggest'), 'edit' => array('type' => 'popup', 'title' => 'Edit template', 'script' => 'wizard_edit.php', 'popup_onlyOpenIfSelected' => 1, 'icon' => 'edit2.gif', 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'), 'add' => array('type' => 'script', 'title' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.basedOn_add', 'icon' => 'add.gif', 'params' => array('table' => 'sys_template', 'pid' => '###CURRENT_PID###', 'setValue' => 'prepend'), 'script' => 'wizard_add.php')))), 'includeStaticAfterBasedOn' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.includeStaticAfterBasedOn', 'exclude' => 1, 'config' => array('type' => 'check', 'default' => '0')), 'config' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.config', 'config' => array('type' => 'text', 'rows' => 10, 'cols' => 48, 'wizards' => array('_PADDING' => 4, '0' => array('title' => 'TSref online', 'script' => 'wizard_tsconfig.php?mode=tsref', 'icon' => 'wizard_tsconfig.gif', 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1')), 'wrap' => 'OFF', 'softref' => 'TStemplate,email[subst],url[subst]'), 'defaultExtras' => 'fixed-font : enable-tab'), 'description' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.description', 'config' => array('type' => 'text', 'rows' => 5, 'cols' => 48)), 'static_file_mode' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.0', '0'), array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.1', '1'), array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.2', '2'), array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.3', '3')), 'default' => '0')), 'tx_impexp_origuid' => array('config' => array('type' => 'passthrough')), 't3ver_label' => array('label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel', 'config' => array('type' => 'input', 'size' => '30', 'max' => '255'))), 'types' => array('1' => array('showitem' => '
			hidden,title;;1;;2-2-2, sitetitle, constants;;;;3-3-3, config, description;;;;4-4-4,
			--div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.options, clear, root, nextLevel,
			--div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.include, includeStaticAfterBasedOn,6-6-6, include_static_file, basedOn, static_file_mode,
			--div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.access, starttime, endtime')));
// backend_layout
$TCA['backend_layout'] = array('ctrl' => $TCA['backend_layout']['ctrl'], 'interface' => array('showRecordFieldList' => 'title,config,description,hidden,icon'), 'columns' => array('title' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.title', 'config' => array('type' => 'input', 'size' => '25', 'max' => '256', 'eval' => 'required')), 'description' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.description', 'config' => array('type' => 'text', 'rows' => '5', 'cols' => '25')), 'config' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.config', 'config' => array('type' => 'text', 'rows' => '5', 'cols' => '25', 'wizards' => array('_PADDING' => 4, 0 => array('title' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.wizard', 'type' => 'popup', 'icon' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('cms') . 'layout/wizard_backend_layout.png', 'script' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('cms') . 'layout/wizard_backend_layout.php', 'JSopenParams' => 'height=800,width=800,status=0,menubar=0,scrollbars=0')))), 'hidden' => array('label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable', 'exclude' => 1, 'config' => array('type' => 'check', 'default' => '0')), 'icon' => array('label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.icon', 'exclude' => 1, 'config' => array('type' => 'group', 'internal_type' => 'file', 'allowed' => 'jpg,gif,png', 'uploadfolder' => 'uploads/media', 'show_thumbs' => 1, 'size' => 1, 'maxitems' => 1))), 'types' => array('1' => array('showitem' => 'hidden,title;;1;;2-2-2, icon, description, config')));
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:30,代码来源:tbl_cms.php

示例13: DB_newWizard

 /**
  * Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php or custom wizard)
  *
  * @param string $table Table name
  * @param integer $uid UID for the current record.
  * @param array $rec Record.
  * @return array Item array, element in $menuItems
  * @internal
  * @todo Define visibility
  */
 public function DB_newWizard($table, $uid, $rec)
 {
     //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
     $tmpTSc = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
     $tmpTSc = $tmpTSc['properties']['newContentWiz.']['overrideWithExtension'];
     $newContentWizScriptPath = \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded($tmpTSc) ? \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php' : 'sysext/cms/layout/db_new_content_el.php';
     $url = $table == 'pages' || !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms') ? 'db_new.php?id=' . $uid . '&pagesOnly=1' : $newContentWizScriptPath . '?id=' . $rec['pid'] . '&sys_language_uid=' . intval($rec['sys_language_uid']);
     return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $this->urlRefForCM($url, 'returnUrl'), 0);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:19,代码来源:ClickMenu.php

示例14: init

 /**
  * Initialization of the class
  *
  * @return void
  */
 public function init()
 {
     // Setting GPvars:
     $this->id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
     $this->edit = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('edit');
     $this->return_id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('return_id');
     $this->lastEdited = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('lastEdited');
     // Module name;
     $this->MCONF = $GLOBALS['MCONF'];
     // Page select clause:
     $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
     // Initializing document template object:
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('templates/perm.html');
     $this->doc->form = '<form action="' . $GLOBALS['BACK_PATH'] . 'tce_db.php" method="post" name="editform">';
     $this->doc->loadJavascriptLib('../t3lib/jsfunc.updateform.js');
     $this->doc->getPageRenderer()->loadPrototype();
     $this->doc->loadJavascriptLib(\TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('perm') . 'mod1/perm.js');
     // Setting up the context sensitive menu:
     $this->doc->getContextMenuCode();
     // Set up menus:
     $this->menuConfig();
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:29,代码来源:PermissionModuleController.php

示例15: addCssToBackend

 /**
  * Adds the necessary CSS to the backend
  *
  * @return void
  */
 protected function addCssToBackend()
 {
     $this->backendReference->addCssFile('opendocs', \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($this->EXTKEY) . 'opendocs.css');
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:9,代码来源:OpendocsController.php


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