當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DocumentTemplate::getHeader方法代碼示例

本文整理匯總了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::getHeader方法的典型用法代碼示例。如果您正苦於以下問題:PHP DocumentTemplate::getHeader方法的具體用法?PHP DocumentTemplate::getHeader怎麽用?PHP DocumentTemplate::getHeader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TYPO3\CMS\Backend\Template\DocumentTemplate的用法示例。


在下文中一共展示了DocumentTemplate::getHeader方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: renderDBInfo

    /**
     * Main function. Will generate the information to display for the item
     * set internally.
     *
     * @return 	void
     * @todo Define visibility
     */
    public function renderDBInfo()
    {
        // Print header, path etc:
        // @TODO invalid context menu code in the output
        $code = $this->doc->getHeader($this->table, $this->row, $this->pageinfo['_thePath'], 1) . '<br />';
        $this->content .= $this->doc->section('', $code);
        $tableRows = array();
        $extraFields = array('crdate' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.creationDate', 1), 'cruser_id' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.creationUserId', 1), 'tstamp' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.timestamp', 1));
        foreach ($extraFields as $name => $value) {
            $rowValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValueExtra($this->table, $name, $this->row[$name]);
            if ($name === 'cruser_id' && $rowValue) {
                $userTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('username, realName', 'be_users', 'uid = ' . intval($rowValue));
                if ($userTemp[0]['username'] !== '') {
                    $rowValue = $userTemp[0]['username'];
                    if ($userTemp[0]['realName'] !== '') {
                        $rowValue .= ' - ' . $userTemp[0]['realName'];
                    }
                }
            }
            $tableRows[] = '
				<tr>
					<td class="t3-col-header">' . $value . '</td>
					<td>' . htmlspecialchars($rowValue) . '</td>
				</tr>';
        }
        // Traverse the list of fields to display for the record:
        $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'], 1);
        foreach ($fieldList as $name) {
            $name = trim($name);
            if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
                continue;
            }
            $isExcluded = !(!$GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $this->table . ':' . $name));
            if ($isExcluded) {
                continue;
            }
            $uid = $this->row['uid'];
            $itemValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
            $itemLabel = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($this->table, $name), 1);
            $tableRows[] = '
				<tr>
					<td class="t3-col-header">' . $itemLabel . '</td>
					<td>' . htmlspecialchars($itemValue) . '</td>
				</tr>';
        }
        // Create table from the information:
        $tableCode = '
			<table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
				' . implode('', $tableRows) . '
			</table>';
        $this->content .= $this->doc->section('', $tableCode);
        // Add path and table information in the bottom:
        $code = '';
        $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], -48) . '<br />';
        $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.table') . ': ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']) . ' (' . $this->table . ') - UID: ' . $this->uid . '<br />';
        $this->content .= $this->doc->section('', $code);
        // References:
        $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'), $this->makeRef($this->table, $this->row['uid']));
        $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'), $this->makeRefFrom($this->table, $this->row['uid']));
    }
開發者ID:noxludo,項目名稱:TYPO3v4-Core,代碼行數:67,代碼來源:ElementInformationController.php

示例2: renderPageTitle

 /**
  * Render page title with icon, table title and record title
  *
  * @return string
  */
 protected function renderPageTitle()
 {
     if ($this->type === 'folder') {
         $table = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:folder');
         $title = $this->doc->getResourceHeader($this->folderObject, array(' ', ''), FALSE);
     } elseif ($this->type === 'file') {
         $table = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
         $title = $this->doc->getResourceHeader($this->fileObject, array(' ', ''), FALSE);
     } else {
         $table = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
         $title = $this->doc->getHeader($this->table, $this->row, $this->pageinfo['_thePath'], 1, array(' ', ''), FALSE);
     }
     return '<h1>' . ($table ? '<small>' . $table . '</small><br />' : '') . $title . '</h1>';
 }
開發者ID:khanhdeux,項目名稱:typo3test,代碼行數:19,代碼來源:ElementInformationController.php

示例3: renderPageTitle

 /**
  * Render page title with icon, table title and record title
  *
  * @return string
  */
 protected function renderPageTitle()
 {
     if ($this->type === 'folder') {
         $table = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:folder');
         $title = $this->doc->getResourceHeader($this->folderObject, array(' ', ''), false);
     } elseif ($this->type === 'file') {
         $table = $this->getLanguageService()->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
         $title = $this->doc->getResourceHeader($this->fileObject, array(' ', ''), false);
     } else {
         $table = $this->getLanguageService()->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']);
         $title = $this->doc->getHeader($this->table, $this->row, $this->pageInfo['_thePath'], 1, array(' ', ''), false);
     }
     // Set HTML title tag
     $this->titleTag = $table . ': ' . strip_tags(BackendUtility::getRecordTitle($this->table, $this->row));
     return '<h1>' . ($table ? '<small>' . $table . '</small><br />' : '') . $title . '</h1>';
 }
開發者ID:rickymathew,項目名稱:TYPO3.CMS,代碼行數:21,代碼來源:ElementInformationController.php

示例4: main


//.........這裏部分代碼省略.........
							ul {
							list-style:none;
							margin:0;
							padding:0;
							}
							a.buttons, a.buttons_db {
							-moz-border-radius:1px 1px 1px 1px;
							BACKGROUND-IMAGE: url(' . $this->FULL_HTTP_URL . 'typo3/sysext/t3skin/images/backgrounds/button.png);
							background-color:#F6F6F6;
							background-image:-moz-linear-gradient(center top , #F6F6F6 10%, #D5D5D5 90%);
							background-position:center bottom;
							background-repeat:repeat-x;
							border:1px solid #7C7C7C;
							color:#434343;
							display:block;
							padding:2px 4px;
							text-align:center;
							font-family:Verdana,Arial,Helvetica,sans-serif;
							font-size:11px;
							line-height:16px;
							}
							a.buttons:hover, a.buttons_db:hover {
							BACKGROUND-IMAGE: url(' . $this->FULL_HTTP_URL . 'typo3/sysext/t3skin/images/backgrounds/button-hover.png);
							background-color:#C8C8C8;
							background-image:-moz-linear-gradient(center top , #F6F6F6 10%, #BDBCBC 90%);
							background-position:center bottom;
							background-repeat:repeat-x;
							border:1px solid #737F91;
							color:#1E1E1E;
							}
							a.buttons {
							width:142px;
							}
							a.buttons_db {
							width:126px;
							}
							fieldset.mod1MultishopFieldset ul { overflow:hidden; width:100%; }
							fieldset.mod1MultishopFieldset ul li { float:left; margin:0 10px 0 0; }							
							</style> 						
							<!--[if IE]>
							<style>
							fieldset {
							position: relative;
							padding-top:15px;
							margin:20px 0 0;
							}
							legend {
							position: absolute;
							top: -10px;
							left: 10px;
							}
							</style>
							<![endif]-->
							<script language="javascript" type="text/javascript">
								script_ended = 0;
								function jumpToUrl(URL)	{
									document.location = URL;
								}
								function CONFIRM(label)
								{
												if (confirm(label))
												{
													return true;
												}
												else
												{
													return false;
												}
								}												
							</script>
						';
            $this->doc->postCode = '
							<script language="javascript" type="text/javascript">
								script_ended = 1;
								if (top.fsMod) top.fsMod.recentIds["web"] = 0;
							</script>
						';
            $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], 50);
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // ShortCut
            if ($BE_USER->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
            }
            $this->content .= $this->doc->spacer(10);
        } else {
            // If no access or if ID == zero
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('mediumDoc');
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
開發者ID:bvbmedia,項目名稱:multishop,代碼行數:101,代碼來源:index.php

示例5: main

    /**
     * Main processing, creating the list of new record tables to select from
     *
     * @return void
     */
    public function main()
    {
        $backendUser = $this->getBackendUser();
        $language = $this->getLanguageService();
        // If there was a page - or if the user is admin
        // (admins has access to the root) we proceed:
        if ($this->pageinfo['uid'] || $backendUser->isAdmin()) {
            // Acquiring TSconfig for this module/current page:
            $this->web_list_modTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
            $this->allowedNewTables = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->web_list_modTSconfig['properties']['allowedNewTables'], 1);
            // Acquiring TSconfig for this module/parent page:
            $this->web_list_modTSconfig_pid = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageinfo['pid'], 'mod.web_list');
            $this->allowedNewTables_pid = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['allowedNewTables'], 1);
            // Set header-HTML and return_url
            $this->code = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />
			';
            $this->regularNew();
            // Create go-back link.
            if ($this->returnUrl) {
                $this->code .= '<br />
					<a href="' . htmlspecialchars($this->returnUrl) . '" class="typo3-goBack">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back', array('title' => $language->getLL('goBack', 1))) . '</a>';
            }
            // Add all the content to an output section
            $this->content .= $this->doc->section('', $this->code);
        }
        $this->content .= $this->doc->endPage();
    }
開發者ID:AndreasA,項目名稱:commerce,代碼行數:32,代碼來源:WizardController.php


注:本文中的TYPO3\CMS\Backend\Template\DocumentTemplate::getHeader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。