本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::endPage方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::endPage方法的具体用法?PHP DocumentTemplate::endPage怎么用?PHP DocumentTemplate::endPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::endPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processRequest
/**
* Processes a general request. The result can be returned by altering the given response.
*
* @param RequestInterface $request The request object
* @param ResponseInterface $response The response, modified by this handler
*/
public function processRequest(RequestInterface $request, ResponseInterface $response)
{
$GLOBALS['SOBE'] = new \stdClass();
$GLOBALS['SOBE']->doc = $this->documentTemplate;
parent::processRequest($request, $response);
$pageHeader = $this->documentTemplate->startpage($this->languageService->sL('LLL:EXT:typo3_forum/Resources/Private/Language/locallang_mod.xml:module.title'));
$pageEnd = $this->documentTemplate->endPage();
$response->setContent($pageHeader . $response->getContent() . $pageEnd);
}
示例2: render
/**
* The main render method
*
* Gathers all content and returns it
*
* @return string
*/
public function render()
{
$docHeaderButtons = array();
// Check if the referenced record is available
$this->recordIsAvailable = $this->repository->hasRecord();
if ($this->recordIsAvailable) {
// Load necessary JavaScript
$this->loadJavascript();
// Load necessary CSS
$this->loadCss();
// Load the settings
$this->loadSettings();
// Localization
$this->loadLocalization();
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers['CSH'] = $docHeaderButtons['csh'];
// Hook
$this->callRenderHook();
}
// Getting the body content
$markers['CONTENT'] = $this->getBodyContent();
// Build the HTML for the module
$content = $this->doc->startPage($this->getLanguageService()->getLL('title', true));
$content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
$content .= $this->doc->endPage();
return $this->doc->insertStylesAndJS($content);
}
示例3: main
/**
* Main function of the module. Write the content to $this->content.
*
* @return void
*/
public function main()
{
$backendUser = $this->getBackendUser();
$language = $this->getLanguageService();
// Access check!
// The page will show only if there is a valid page and if
// this page may be viewed by the user
$this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo);
// Checking access:
if ($this->id && $access || $backendUser->isAdmin()) {
// Render content:
$this->moduleContent();
} else {
// If no access or if ID == zero
$this->content .= $this->doc->header($language->getLL('statistic'));
}
$docHeaderButtons = $this->getHeaderButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->content);
$markers['FUNC_MENU'] = $this->doc->funcMenu('', \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']));
// put it all together
$this->content = $this->doc->startPage($language->getLL('statistic'));
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例4: main
/**
* Main function to generate the content
*
* @return void
* @todo Define visibility
*/
public function main()
{
$this->content = $this->doc->header('Indexing Engine Statistics');
$this->content .= $this->doc->spacer(5);
switch ($this->MOD_SETTINGS['function']) {
case 'stat':
$this->content .= $this->doc->section('Records', $this->doc->table($this->getRecordsNumbers()), 0, 1);
$this->content .= $this->doc->spacer(15);
$this->content .= $this->doc->section('index_phash TYPES', $this->doc->table($this->getPhashTypes()), 1);
$this->content .= $this->doc->spacer(15);
break;
case 'externalDocs':
$this->content .= $this->doc->section('External documents', $this->doc->table($this->getPhashExternalDocs()), 0, 1);
$this->content .= $this->doc->spacer(15);
break;
case 'typo3pages':
$this->content .= $this->doc->section('TYPO3 Pages', $this->doc->table($this->getPhashT3pages()), 0, 1);
$this->content .= $this->doc->spacer(15);
break;
}
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
$this->content = $this->doc->startPage('Indexing Engine Statistics');
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例5: main
/**
* Main function, rendering the browsable page tree
*
* @return void
* @todo Define visibility
*/
public function main()
{
// Produce browse-tree:
$tree = $this->pagetree->getBrowsableTree();
// Outputting Temporary DB mount notice:
if ($this->active_tempMountPoint) {
$flashText = '
<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) . '</a> <br />' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.path', 1) . ': <span title="' . htmlspecialchars($this->active_tempMountPoint['_thePathFull']) . '">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->active_tempMountPoint['_thePath'], -50)) . '</span>
';
$flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $flashText, '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
$this->content .= $flashMessage->render();
}
// Outputting page tree:
$this->content .= '<div id="PageTreeDiv">' . $tree . '</div>';
// Adding javascript for drag & drop activation and highlighting
$this->content .= $this->doc->wrapScriptTags('
' . ($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '') . '
Tree.registerDragDropHandlers();');
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('IMG_RESET' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array('id' => 'treeFilterReset', 'alt' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'), 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter'))), 'WORKSPACEINFO' => $this->getWorkspaceInfo(), 'CONTENT' => $this->content);
$subparts = array();
if (!$this->hasFilterBox) {
$subparts['###SECOND_ROW###'] = '';
}
// Build the <body> for the module
$this->content = $this->doc->startPage('TYPO3 Page Tree');
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例6: mainAction
/**
* Injects the request object for the current request or subrequest
* As this controller goes only through the main() method, it is rather simple for now
*
* @param ServerRequestInterface $request the current request
* @param ResponseInterface $response the prepared response object
* @return ResponseInterface the response with the content
*/
public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
{
$this->determineScriptUrl($request);
$this->initVariables($request);
$this->loadLinkHandlers();
$this->initCurrentUrl();
$menuData = $this->buildMenuArray();
$renderLinkAttributeFields = $this->renderLinkAttributeFields();
$browserContent = $this->displayedLinkHandler->render($request);
$this->initDocumentTemplate();
$content = $this->doc->startPage('Link Browser');
$content .= $this->doc->getFlashMessages();
if ($this->currentLink) {
$content .= '<!-- Print current URL -->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-curUrl">
<tr>
<td>' . $this->getLanguageService()->getLL('currentLink', true) . ': ' . htmlspecialchars($this->currentLinkHandler->formatCurrentUrl()) . '</td>
</tr>
</table>';
}
$content .= $this->doc->getTabMenuRaw($menuData);
$content .= $renderLinkAttributeFields;
$content .= '<div class="linkBrowser-tabContent">' . $browserContent . '</div>';
$content .= $this->doc->endPage();
$response->getBody()->write($this->doc->insertStylesAndJS($content));
return $response;
}
示例7: printContent
/**
* Outputting the accumulated content to screen
*
* @return void
* @todo Define visibility
*/
public function printContent()
{
$content = '';
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
if ($this->editPage && $this->isAjaxCall) {
$data = array();
// edit page
if ($this->theEditRec['uid']) {
$data['type'] = 'page';
$data['editRecord'] = $this->theEditRec['uid'];
}
// edit alternative table/uid
if (count($this->alternativeTableUid) == 2 && isset($GLOBALS['TCA'][$this->alternativeTableUid[0]]) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->alternativeTableUid[1])) {
$data['type'] = 'alternative';
$data['alternativeTable'] = $this->alternativeTableUid[0];
$data['alternativeUid'] = $this->alternativeTableUid[1];
}
// search for something else
if ($this->searchFor) {
$data['type'] = 'search';
$data['firstMountPoint'] = intval($GLOBALS['WEBMOUNTS'][0]);
$data['searchFor'] = $this->searchFor;
}
$content = json_encode($data);
header('Content-type: application/json; charset=utf-8');
header('X-JSON: ' . $content);
} else {
$content = $this->content;
}
echo $content;
}
示例8: main_folder
/**
* TYPO3 Element Browser: Showing a folder tree, allowing you to browse for folders.
*
* @return string HTML content for the module
* @todo Define visibility
*/
public function main_folder()
{
// include JS files
$this->doc->getDragDropCode('folders');
// Setting prefs for foldertree
$this->doc->JScode .= $this->doc->wrapScriptTags('
Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";
');
// Starting content:
$content = $this->doc->startPage('TBE folder selector');
// Add the FlashMessages if any
$content .= $this->doc->getFlashMessages();
// Init variable:
$parameters = explode('|', $this->bparams);
if ($this->expandFolder) {
$this->selectedFolder = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($this->expandFolder);
}
if ($this->selectedFolder) {
$createFolder = $this->createFolder($this->selectedFolder);
} else {
$createFolder = '';
}
// Create folder tree:
$folderTree = GeneralUtility::makeInstance('TBE_FolderTree');
$folderTree->thisScript = $this->thisScript;
$folderTree->ext_noTempRecyclerDirs = $this->mode == 'filedrag';
$tree = $folderTree->getBrowsableTree(FALSE);
list(, , $specUid) = explode('_', $this->PM);
if ($this->selectedFolder) {
if ($this->mode == 'filedrag') {
$folders = $this->TBE_dragNDrop($this->selectedFolder, $parameters[3]);
} else {
$folders = $this->TBE_expandSubFolders($this->selectedFolder);
}
}
// Putting the parts together, side by side:
$content .= '
<!--
Wrapper table for folder tree / folder list:
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-EBfiles">
<tr>
<td class="c-wCell" valign="top">' . $this->barheader($GLOBALS['LANG']->getLL('folderTree') . ':') . $tree . '</td>
<td class="c-wCell" valign="top">' . $folders . '</td>
</tr>
</table>
';
// Adding create folder if applicable:
$content .= $createFolder;
// Add some space
$content .= '<br /><br />';
// Ending page, returning content:
$content .= $this->doc->endPage();
$content = $this->doc->insertStylesAndJS($content);
return $content;
}
示例9: mainAction
/**
* Injects the request object for the current request or subrequest
* As this controller goes only through the main() method, it is rather simple for now
*
* @param ServerRequestInterface $request the current request
* @param ResponseInterface $response
* @return ResponseInterface the response with the content
*/
public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
{
$this->main();
$content = $this->doc->startPage($this->titleTag);
$content .= $this->doc->insertStylesAndJS($this->content);
$content .= $this->doc->endPage();
$response->getBody()->write($content);
return $response;
}
示例10: processRequest
/**
* Processes a general request. The result can be returned by altering the given response.
*
* @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
* @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException if the controller doesn't support the current request type
* @return void
*/
public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
{
$this->template = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->pageRenderer = $this->template->getPageRenderer();
$GLOBALS['SOBE'] = new \stdClass();
$GLOBALS['SOBE']->doc = $this->template;
parent::processRequest($request, $response);
$pageHeader = $this->template->startpage($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:module.title'));
$pageEnd = $this->template->endPage();
$response->setContent($pageHeader . $response->getContent() . $pageEnd);
}
示例11: main
/**
* Main function, rendering the browsable page tree
*
* @return void
*/
public function main()
{
// Produce browse-tree:
$tree = $this->pagetree->getBrowsableTree();
$docHeaderButtons = $this->getButtons();
$markers = array('IMG_RESET' => '', 'WORKSPACEINFO' => '', 'CONTENT' => $tree);
// Build the <body> for the module
$this->content = $this->doc->startPage($this->getLanguageService()->sl('LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'));
$this->content .= $this->doc->moduleBody('', $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例12: main
/**
* Main function, rendering the folder tree
*
* @return void
*/
public function main()
{
// Produce browse-tree:
$tree = $this->foldertree->getBrowsableTree();
// Outputting page tree:
$this->content .= $tree;
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('CONTENT' => $this->content);
$subparts = array();
// Build the <body> for the module
$this->content = $this->doc->startPage('TYPO3 Folder Tree');
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例13: main
/**
* Main function, rendering the upload file form fields
*
* @return void
*/
public function main()
{
// Make page header:
$this->content = $this->doc->startPage($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle'));
$form = $this->renderUploadForm();
$pageContent = $this->doc->header($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
// Header Buttons
$docHeaderButtons = array('csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload'), 'back' => '');
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => '', 'CONTENT' => $pageContent, 'PATH' => $this->title);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', true) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
}
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例14: main
/**
* Main function, rendering the upload file form fields
*
* @return void
*/
public function main()
{
// Make page header:
$this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle'));
$form = $this->renderUploadForm();
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
// Header Buttons
$docHeaderButtons = array('csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH']), 'back' => '');
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $pageContent, 'PATH' => $this->title);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例15: main
/**
* Main function, rendering the table wizard
*
* @return void
*/
public function main()
{
if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
$this->content .= $this->doc->section($this->getLanguageService()->getLL('table_title'), $this->tableWizard(), 0, 1);
} else {
$this->content .= $this->doc->section($this->getLanguageService()->getLL('table_title'), '<span class="typo3-red">' . $this->getLanguageService()->getLL('table_noData', TRUE) . '</span>', 0, 1);
}
// Setting up the buttons and markers for docHeader
$docHeaderButtons = $this->getButtons();
$markers['CSH'] = $docHeaderButtons['csh'];
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$this->content = $this->doc->startPage('Table');
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}