本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::render方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::render方法的具体用法?PHP DocumentTemplate::render怎么用?PHP DocumentTemplate::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::render方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* Main
*
* @return void
* @todo Define visibility
*/
public function main()
{
// Content creation
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$this->menu = BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
}
switch ($this->MOD_SETTINGS['function']) {
case 'search':
$this->func_search();
break;
case 'records':
$this->func_records();
break;
case 'relations':
$this->func_relations();
break;
case 'refindex':
$this->func_refindex();
break;
default:
$this->func_default();
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => $this->getFuncMenu(), 'CONTENT' => $this->content);
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
}
示例2: flush
/**
* Flushes the rendered content to browser.
*
* @return void
*/
public function flush()
{
$content = $this->doc->moduleBody($this->pageRecord, $this->getDocHeaderButtons(), $this->getTemplateMarkers());
// Renders the module page
$content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
$this->content = NULL;
$this->doc = NULL;
echo $content;
}
示例3: main
/**
* Main function, creating the content for the access editing forms/listings
*
* @return void
*/
public function main()
{
// 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 || $GLOBALS['BE_USER']->isAdmin() && !$this->id) {
if ($GLOBALS['BE_USER']->isAdmin() && !$this->id) {
$this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
}
// This decides if the editform can and will be drawn:
$this->editingAllowed = $this->pageinfo['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin();
$this->edit = $this->edit && $this->editingAllowed;
// If $this->edit then these functions are called in the end of the page...
if ($this->edit) {
$this->doc->postCode .= $this->doc->wrapScriptTags('
setCheck("check[perms_user]", "data[pages][' . $this->id . '][perms_user]");
setCheck("check[perms_group]", "data[pages][' . $this->id . '][perms_group]");
setCheck("check[perms_everybody]", "data[pages][' . $this->id . '][perms_everybody]");
');
}
// Draw the HTML page header.
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('permissions') . ($this->edit ? ': ' . $GLOBALS['LANG']->getLL('Edit') : ''));
$this->content .= $this->doc->spacer(5);
$vContent = $this->doc->getVersionSelector($this->id, 1);
if ($vContent) {
$this->content .= $this->doc->section('', $vContent);
}
// Main function, branching out:
if (!$this->edit) {
$this->notEdit();
} else {
$this->doEdit();
}
$docHeaderButtons = $this->getButtons();
$markers['CSH'] = $this->docHeaderButtons['csh'];
$markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
} else {
// If no access or if ID == zero
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('permissions'));
}
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('permissions'), $this->content);
}
示例4: main
/**
* Initialize module header etc and call extObjContent function
*
* @return void
*/
public function main()
{
// 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 = BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo);
// Template markers
$markers = array('CSH' => '', 'FUNC_MENU' => '', 'CONTENT' => '');
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:func/Resources/Private/Templates/func.html');
// Main
if ($this->id && $access) {
// JavaScript
$this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_func')) . '" method="post"><input type="hidden" name="id" value="' . htmlspecialchars($this->id) . '" />';
$vContent = $this->doc->getVersionSelector($this->id, TRUE);
if ($vContent) {
$this->content .= $this->doc->section('', $vContent);
}
$this->extObjContent();
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers['CSH'] = $docHeaderButtons['csh'];
$markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
$markers['CONTENT'] = $this->content;
} else {
// If no access or if ID == zero
$title = $this->getLanguageService()->getLL('title');
$message = $this->getLanguageService()->getLL('clickAPage_content');
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:func/Resources/Private/Templates/InfoBox.html'));
$view->assignMultiple(array('title' => $title, 'message' => $message, 'state' => InfoboxViewHelper::STATE_INFO));
$this->content = $view->render();
// 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->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render($this->getLanguageService()->getLL('title'), $this->content);
}
示例5: main
/**
* Main function of the module. Write the content to $this->content
*
* @return void
*/
public function main()
{
// Access check!
// The page will show only if user has admin rights
if ($GLOBALS['BE_USER']->user['admin']) {
// Set the form
//$this->doc->form = '<form name="tx_kickstarter_form" id="tx_kickstarter_form" method="post" action="">';
// Prepare main content
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('function.' . $this->MOD_SETTINGS['function']));
$this->content .= $this->getModuleContent();
} else {
// If no access, only display the module's title
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
}
// Place content inside template
$content = $this->doc->moduleBody(array(), $this->getDocHeaderButtons(), $this->getTemplateMarkers());
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
}
示例6: main
/**
* Initialize module header etc and call extObjContent function
*
* @return void
*/
public function main()
{
// 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 = BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo);
if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
$this->CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($this->pageinfo);
if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
$this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
}
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:info/Resources/Private/Templates/info.html');
$this->doc->tableLayout = array('0' => array('0' => array('<td valign="top"><strong>', '</strong></td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')), 'defRow' => array('0' => array('<td valign="top">', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')));
// JavaScript
$this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_info')) . '" method="post" name="webinfoForm">';
$vContent = $this->doc->getVersionSelector($this->id, 1);
if ($vContent) {
$this->content .= $this->doc->section('', $vContent);
}
$this->extObjContent();
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
} else {
// If no access or if ID == zero
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->spacer(10);
}
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
}
示例7: main
//.........这里部分代码省略.........
if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
top.content.nav_frame.refresh_nav();
}
}
' . $this->doc->redirectUrls($listUrl) . '
' . $dblist->CBfunctions() . '
function editRecords(table,idList,addParams,CBflag) { //
window.location.href="' . $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
}
function editList(table,idList) { //
var list="";
// Checking how many is checked, how many is not
var pointer=0;
var pos = idList.indexOf(",");
while (pos!=-1) {
if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) {
list+=idList.substr(pointer,pos-pointer)+",";
}
pointer=pos+1;
pos = idList.indexOf(",",pointer);
}
if (cbValue(table+"|"+idList.substr(pointer))) {
list+=idList.substr(pointer)+",";
}
return list ? list : idList;
}
if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';
');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
}
// access
// Begin to compile the whole page, starting out with page header:
$this->body = $this->doc->header($this->pageinfo['title']);
$this->body .= '<form action="' . htmlspecialchars($dblist->listURL()) . '" method="post" name="dblistForm">';
$this->body .= $dblist->HTMLcode;
$this->body .= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
// If a listing was produced, create the page footer with search form etc:
if ($dblist->HTMLcode) {
// Making field select box (when extended view for a single table is enabled):
if ($dblist->table) {
$this->body .= $dblist->fieldSelectBox($dblist->table);
}
// Adding checkbox options for extended listing and clipboard display:
$this->body .= '
<!--
Listing options for extended view, clipboard and localization view
-->
<div id="typo3-listOptions">
<form action="" method="post">';
// Add "display bigControlPanel" checkbox:
if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'selectable') {
$this->body .= BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLargeControl"');
$this->body .= '<label for="checkLargeControl">' . BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('largeControl', TRUE)) . '</label><br />';
}
// Add "clipboard" checkbox:
if ($this->modTSconfig['properties']['enableClipBoard'] === 'selectable') {
if ($dblist->showClipboard) {
$this->body .= BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', $this->table ? '&table=' . $this->table : '', 'id="checkShowClipBoard"');
$this->body .= '<label for="checkShowClipBoard">' . BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('showClipBoard', TRUE)) . '</label><br />';
}
}
// Add "localization view" checkbox:
if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
$this->body .= BackendUtility::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"');
$this->body .= '<label for="checkLocalization">' . BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('localization', TRUE)) . '</label><br />';
}
$this->body .= '
</form>
</div>';
}
// Printing clipboard if enabled
if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard && ($dblist->HTMLcode || $dblist->clipObj->hasElements())) {
$this->body .= '<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() . '</div>';
}
// Search box:
if (!$this->modTSconfig['properties']['disableSearchBox'] && ($dblist->HTMLcode || $dblist->searchString !== '')) {
$sectionTitle = BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.search', TRUE));
$this->body .= '<div class="db_list-searchbox">' . $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE) . '</div>';
}
// Additional footer content
$footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook'];
if (is_array($footerContentHook)) {
foreach ($footerContentHook as $hook) {
$params = array();
$this->body .= GeneralUtility::callUserFunction($hook, $params, $this);
}
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $dblist->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->body, 'EXTRACONTAINERCLASS' => $this->table ? 'singletable' : '');
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render('DB list', $this->content);
}
示例8: printContent
/**
* Returns the sourcecode to the browser
*
* @return void
*/
public function printContent()
{
echo $this->doc->render('Grid wizard', $this->content);
}
示例9: main
//.........这里部分代码省略.........
$CB['setP'] = 'normal';
}
$this->filelist->clipObj->setCmd($CB);
$this->filelist->clipObj->cleanCurrent();
// Saves
$this->filelist->clipObj->endClipboard();
// If the "cmd" was to delete files from the list (clipboard thing), do that:
if ($this->cmd == 'delete') {
$items = $this->filelist->clipObj->cleanUpCBC(GeneralUtility::_POST('CBC'), '_FILE', 1);
if (!empty($items)) {
// Make command array:
$FILE = array();
foreach ($items as $v) {
$FILE['delete'][] = array('data' => $v);
}
// Init file processing object for deleting and pass the cmd array.
$fileProcessor = GeneralUtility::makeInstance(ExtendedFileUtility::class);
$fileProcessor->init(array(), $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
$fileProcessor->setActionPermissions();
$fileProcessor->dontCheckForUnique = $this->overwriteExistingFiles ? 1 : 0;
$fileProcessor->start($FILE);
$fileProcessor->processData();
$fileProcessor->pushErrorMessagesToFlashMessageQueue();
}
}
if (!isset($this->MOD_SETTINGS['sort'])) {
// Set default sorting
$this->MOD_SETTINGS['sort'] = 'file';
$this->MOD_SETTINGS['reverse'] = 0;
}
// Start up filelisting object, include settings.
$this->pointer = MathUtility::forceIntegerInRange($this->pointer, 0, 100000);
$this->filelist->start($this->folderObject, $this->pointer, $this->MOD_SETTINGS['sort'], $this->MOD_SETTINGS['reverse'], $this->MOD_SETTINGS['clipBoard'], $this->MOD_SETTINGS['bigControlPanel']);
// Generate the list
$this->filelist->generateList();
// Set top JavaScript:
$this->doc->JScode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["file"] = "' . rawurlencode($this->id) . '";' . $this->filelist->CBfunctions());
// This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
$this->doc->getContextMenuCode();
// Setting up the buttons and markers for docheader
list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->folderObject);
// add the folder info to the marker array
$otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo();
$docHeaderButtons = array_merge($this->getButtons(), $buttons);
// Include DragUploader only if we have write access
if ($this->folderObject->getStorage()->checkUserActionPermission('add', 'File') && $this->folderObject->checkActionPermission('write')) {
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DragUploader');
$pageRenderer->addInlineLanguagelabelFile(ExtensionManagementUtility::extPath('lang') . 'locallang_core.xlf', 'file_upload');
}
// Build the <body> for the module
$moduleHeadline = $this->getModuleHeadline();
// Create output
$pageContent = $moduleHeadline !== '' ? '<h1>' . $moduleHeadline . '</h1>' : '';
$pageContent .= '<form action="' . htmlspecialchars($this->filelist->listURL()) . '" method="post" name="dblistForm">';
$pageContent .= $this->filelist->HTMLcode;
$pageContent .= '<input type="hidden" name="cmd" /></form>';
// Making listing options:
if ($this->filelist->HTMLcode) {
$pageContent .= '
<!--
Listing options for extended view, clipboard and thumbnails
-->
<div id="typo3-listOptions">
';
// Add "display bigControlPanel" checkbox:
if ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
$pageContent .= '<div class="checkbox">' . '<label for="bigControlPanel">' . BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . $this->getLanguageService()->getLL('bigControlPanel', TRUE) . '</label>' . '</div>';
}
// Add "display thumbnails" checkbox:
if ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
$pageContent .= '<div class="checkbox">' . '<label for="checkDisplayThumbs">' . BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . $this->getLanguageService()->getLL('displayThumbs', TRUE) . '</label>' . '</div>';
}
// Add "clipboard" checkbox:
if ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
$pageContent .= '<div class="checkbox">' . '<label for="checkClipBoard">' . BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . $this->getLanguageService()->getLL('clipBoard', TRUE) . '</label>' . '</div>';
}
$pageContent .= '
</div>
';
// Set clipboard:
if ($this->MOD_SETTINGS['clipBoard']) {
$pageContent .= $this->filelist->clipObj->printClipboard();
$pageContent .= BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_clipboard');
}
}
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => ($this->errorMessage ? $this->errorMessage->render() : '') . $pageContent, 'FOLDER_IDENTIFIER' => $this->folderObject->getCombinedIdentifier(), 'FILEDENYPATERN' => $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'], 'MAXFILESIZE' => GeneralUtility::getMaxUploadFileSize() * 1024);
$this->content = $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
// Renders the module page
$this->content = $this->doc->render($this->getLanguageService()->getLL('files'), $this->content);
} else {
$content = '';
if ($this->errorMessage) {
$this->errorMessage->setSeverity(FlashMessage::ERROR);
$content = $this->doc->moduleBody(array(), array_merge(array('REFRESH' => '', 'PASTE' => '', 'LEVEL_UP' => ''), $this->getButtons()), array('CSH' => '', 'TITLE' => '', 'FOLDER_INFO' => '', 'PAGE_ICON' => '', 'FUNC_MENU' => '', 'CONTENT' => $this->errorMessage->render()));
}
// Create output - no access (no warning though)
$this->content = $this->doc->render($this->getLanguageService()->getLL('files'), $content);
}
}
示例10: main
/**
* Generate the main settings formular:
*
* @return void
* @todo Define visibility
*/
public function main()
{
global $LANG;
if ($this->languageUpdate) {
$this->doc->JScodeArray['languageUpdate'] .= '
if (top.refreshMenu) {
top.refreshMenu();
} else {
top.TYPO3ModuleMenu.refreshMenu();
}
';
}
if ($this->pagetreeNeedsRefresh) {
BackendUtility::setUpdateSignal('updatePageTree');
}
// Start page:
$this->doc->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/md5.js');
// Use a wrapper div
$this->content .= '<div id="user-setup-wrapper">';
// Load available backend modules
$this->loadModules = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
$this->loadModules->observeWorkspaces = TRUE;
$this->loadModules->load($GLOBALS['TBE_MODULES']);
$this->content .= $this->doc->header($LANG->getLL('UserSettings'));
// Show if setup was saved
if ($this->setupIsUpdated && !$this->tempDataIsCleared && !$this->settingsAreResetToDefault) {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('setupWasUpdated'), $LANG->getLL('UserSettings'));
$this->content .= $flashMessage->render();
}
// Show if temporary data was cleared
if ($this->tempDataIsCleared) {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('tempDataClearedFlashMessage'), $LANG->getLL('tempDataCleared'));
$this->content .= $flashMessage->render();
}
// Show if temporary data was cleared
if ($this->settingsAreResetToDefault) {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('settingsAreReset'), $LANG->getLL('resetConfiguration'));
$this->content .= $flashMessage->render();
}
// Notice
if ($this->setupIsUpdated || $this->settingsAreResetToDefault) {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('activateChanges'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
$this->content .= $flashMessage->render();
}
// If password is updated, output whether it failed or was OK.
if ($this->passwordIsSubmitted) {
if ($this->passwordIsUpdated) {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('newPassword_ok'), $LANG->getLL('newPassword'));
} else {
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('newPassword_failed'), $LANG->getLL('newPassword'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
}
$this->content .= $flashMessage->render();
}
// Render the menu items
$menuItems = $this->renderUserSetup();
$this->content .= $this->doc->getDynTabMenu($menuItems, 'user-setup', FALSE, FALSE, 1, FALSE, 1, $this->dividers2tabs);
$formToken = $this->formProtection->generateToken('BE user setup', 'edit');
$this->content .= $this->doc->section('', '<input type="hidden" name="simUser" value="' . $this->simUser . '" />
<input type="hidden" name="formToken" value="' . $formToken . '" />
<input type="hidden" value="1" name="data[save]" />
<input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />
<input type="hidden" name="data[clearSessionVars]" value="0" id="clearSessionVars" />');
// End of wrapper div
$this->content .= '</div>';
// 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->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render($LANG->getLL('UserSettings'), $this->content);
}
示例11: main
//.........这里部分代码省略.........
}
top.DTM_currentTabs[idBase] = index;
}
}
}
function DTM_toggle(idBase,index,isInit) { //
// Showing one:
if (document.getElementById(idBase+"-"+index+"-DIV")) {
if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") {
document.getElementById(idBase+"-"+index+"-DIV").className = "tab-pane";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").value = "tab";
} else {
DTM_origClass = "tab";
}
top.DTM_currentTabs[idBase+"-"+index] = 0;
} else {
document.getElementById(idBase+"-"+index+"-DIV").className = "tab-pane active";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").value = "active";
} else {
DTM_origClass = "active";
}
top.DTM_currentTabs[idBase+"-"+index] = 1;
}
}
}
');
// Setting doc-header
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_layout', array('id' => $this->id, 'imagemode' => $this->imagemode))) . '" method="post">';
// Creating the top function menu:
$this->topFuncMenu = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'], '', '');
$languageMenu = count($this->MOD_MENU['language']) > 1 ? $lang->sL('LLL:EXT:lang/locallang_general.xlf:LGL.language', TRUE) . BackendUtility::getFuncMenu($this->id, 'SET[language]', $this->current_sys_language, $this->MOD_MENU['language'], '', '') : '';
// Find backend layout / coumns
$backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);
if (!empty($backendLayout['__colPosList'])) {
$this->colPosList = implode(',', $backendLayout['__colPosList']);
}
// Removing duplicates, if any
$this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));
// Accessible columns
if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {
$this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));
// Match with the list which is present in the colPosList for the current page
if (!empty($this->colPosList) && !empty($this->activeColPosList)) {
$this->activeColPosList = array_unique(array_intersect($this->activeColPosList, $this->colPosList));
}
} else {
$this->activeColPosList = $this->colPosList;
}
$this->activeColPosList = implode(',', $this->activeColPosList);
$this->colPosList = implode(',', $this->colPosList);
$body = '';
$body .= $this->getHeaderFlashMessagesForCurrentPid();
// Render the primary module content:
if ($this->MOD_SETTINGS['function'] == 0) {
// QuickEdit
$body .= $this->renderQuickEdit();
} else {
// Page title
$body .= $this->doc->header($this->getLocalizedPageTitle());
// All other listings
$body .= $this->renderListContent();
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons($this->MOD_SETTINGS['function'] == 0 ? 'quickEdit' : '');
$this->markers['CSH'] = $docHeaderButtons['csh'];
$this->markers['TOP_FUNCTION_MENU'] = $this->topFuncMenu . $this->editSelect;
$this->markers['LANGSELECTOR'] = $languageMenu;
$this->markers['CONTENT'] = $body;
// Build the <body> for the module
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $this->markers);
// Renders the module page
$this->content = $this->doc->render($lang->getLL('title'), $this->content);
} else {
// If no access or id value, create empty document:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout.html');
$this->doc->JScode = $this->doc->wrapScriptTags('
if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';
');
$body = $this->doc->header($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']);
$title = $lang->getLL('clickAPage_header');
$message = $lang->getLL('clickAPage_content');
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));
$view->assignMultiple(array('title' => $title, 'message' => $message, 'state' => InfoboxViewHelper::STATE_INFO));
$body .= $view->render();
// Setting up the buttons and markers for docheader
$docHeaderButtons = array('view' => '', 'history_page' => '', 'new_content' => '', 'move_page' => '', 'move_record' => '', 'new_page' => '', 'edit_page' => '', 'csh' => '', 'shortcut' => '', 'cache' => '', 'savedok' => '', 'savedokshow' => '', 'closedok' => '', 'deletedok' => '', 'undo' => '', 'history_record' => '', 'edit_language' => '');
$this->markers['CSH'] = '';
$this->markers['TOP_FUNCTION_MENU'] = '';
$this->markers['LANGSELECTOR'] = '';
$this->markers['CONTENT'] = $body;
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $this->markers);
// Renders the module page
$this->content = $this->doc->render($lang->getLL('title'), $this->content);
}
}
示例12: main
//.........这里部分代码省略.........
case 5:
$theVar = $GLOBALS['TBE_MODULES'];
GeneralUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_MODULES';
break;
case 6:
$theVar = $GLOBALS['TBE_MODULES_EXT'];
GeneralUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_MODULES_EXT';
break;
case 7:
$theVar = $GLOBALS['TBE_STYLES'];
GeneralUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_STYLES';
break;
case 8:
$theVar = $GLOBALS['BE_USER']->uc;
GeneralUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$BE_USER->uc';
break;
case 9:
$theVar = $GLOBALS['TYPO3_USER_SETTINGS'];
GeneralUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TYPO3_USER_SETTINGS';
break;
default:
$theVar = array();
}
// Update node:
$update = 0;
$node = GeneralUtility::_GET('node');
// If any plus-signs were clicked, it's registred.
if (is_array($node)) {
$this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']] = $arrayBrowser->depthKeys($node, $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']]);
$update = 1;
}
if ($update) {
$GLOBALS['BE_USER']->pushModuleData($this->MCONF['name'], $this->MOD_SETTINGS);
}
$arrayBrowser->depthKeys = $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']];
$arrayBrowser->regexMode = $this->MOD_SETTINGS['regexsearch'];
$arrayBrowser->fixedLgd = $this->MOD_SETTINGS['fixedLgd'];
$arrayBrowser->searchKeysToo = TRUE;
// If any POST-vars are send, update the condition array
if (GeneralUtility::_POST('search') && trim($search_field)) {
$arrayBrowser->depthKeys = $arrayBrowser->getSearchKeys($theVar, '', $search_field, array());
}
// mask the encryption key to not show it as plaintext in the configuration module
if ($theVar == $GLOBALS['TYPO3_CONF_VARS']) {
$theVar['SYS']['encryptionKey'] = '***** (length: ' . strlen($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) . ' characters)';
}
$tree = $arrayBrowser->tree($theVar, '', '');
$this->content .= $this->doc->sectionEnd();
// Variable name:
if (GeneralUtility::_GP('varname')) {
$line = GeneralUtility::_GP('_') ? GeneralUtility::_GP('_') : GeneralUtility::_GP('varname');
// Write the line to extTables.php
if (GeneralUtility::_GP('writetoexttables')) {
// change value to $GLOBALS
$length = strpos($line, '[');
$var = substr($line, 0, $length);
$changedLine = '$GLOBALS[\'' . substr($line, 1, $length - 1) . '\']' . substr($line, $length);
// load current extTables.php
$extTables = GeneralUtility::getUrl(PATH_typo3conf . TYPO3_extTableDef_script);
if ($var === '$TCA') {
// check if we are editing the TCA
preg_match_all('/\\[\'([^\']+)\'\\]/', $line, $parts);
}
// insert line in extTables.php
$extTables = preg_replace('/<\\?php|\\?>/is', '', $extTables);
$extTables = '<?php' . (empty($extTables) ? LF : '') . $extTables . $changedLine . LF . '?>';
$success = GeneralUtility::writeFile(PATH_typo3conf . TYPO3_extTableDef_script, $extTables);
if ($success) {
// show flash message
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '', sprintf($GLOBALS['LANG']->getLL('writeMessage', TRUE), TYPO3_extTableDef_script, '<br />', '<strong>' . nl2br(htmlspecialchars($changedLine)) . '</strong>'), \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
} else {
// Error: show flash message
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '', sprintf($GLOBALS['LANG']->getLL('writeMessageFailed', TRUE), TYPO3_extTableDef_script), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
}
$this->content .= $flashMessage->render();
}
$this->content .= '<div id="lowlevel-config-var">
<strong>' . $GLOBALS['LANG']->getLL('variable', TRUE) . '</strong><br />
<input type="text" name="_" value="' . trim(htmlspecialchars($line)) . '" size="120" /><br/>';
if (TYPO3_extTableDef_script !== '' && ($this->MOD_SETTINGS['function'] === '1' || $this->MOD_SETTINGS['function'] === '4')) {
// write only for $TCA and TBE_STYLES if TYPO3_extTableDef_script is defined
$this->content .= '<br /><input type="submit" name="writetoexttables" value="' . $GLOBALS['LANG']->getLL('writeValue', TRUE) . '" /></div>';
} else {
$this->content .= $GLOBALS['LANG']->getLL('copyPaste', TRUE) . LF . '</div>';
}
}
$this->content .= '<div class="nowrap">' . $tree . '</div>';
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => $this->getFuncMenu(), 'CONTENT' => $this->content);
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render('Configuration', $this->content);
}
示例13: main
//.........这里部分代码省略.........
$this->filelist->clipObj->cleanCurrent();
// Saves
$this->filelist->clipObj->endClipboard();
// If the "cmd" was to delete files from the list (clipboard thing), do that:
if ($this->cmd == 'delete') {
$items = $this->filelist->clipObj->cleanUpCBC(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('CBC'), '_FILE', 1);
if (count($items)) {
// Make command array:
$FILE = array();
foreach ($items as $v) {
$FILE['delete'][] = array('data' => $v);
}
// Init file processing object for deleting and pass the cmd array.
$fileProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
$fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
$fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
$fileProcessor->dontCheckForUnique = $this->overwriteExistingFiles ? 1 : 0;
$fileProcessor->start($FILE);
$fileProcessor->processData();
$fileProcessor->printLogErrorMessages();
}
}
if (!isset($this->MOD_SETTINGS['sort'])) {
// Set default sorting
$this->MOD_SETTINGS['sort'] = 'file';
$this->MOD_SETTINGS['reverse'] = 0;
}
// Start up filelisting object, include settings.
$this->pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->pointer, 0, 100000);
$this->filelist->start($this->folderObject, $this->pointer, $this->MOD_SETTINGS['sort'], $this->MOD_SETTINGS['reverse'], $this->MOD_SETTINGS['clipBoard'], $this->MOD_SETTINGS['bigControlPanel']);
// Generate the list
$this->filelist->generateList();
// Write the footer
$this->filelist->writeBottom();
// Set top JavaScript:
$this->doc->JScode = $this->doc->wrapScriptTags('
if (top.fsMod) top.fsMod.recentIds["file"] = unescape("' . rawurlencode($this->id) . '");
function jumpToUrl(URL) { //
window.location.href = URL;
}
' . $this->filelist->CBfunctions());
// This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
$this->doc->getContextMenuCode();
// Setting up the buttons and markers for docheader
list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->folderObject);
// add the folder info to the marker array
$otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo();
$docHeaderButtons = array_merge($this->getButtons(), $buttons);
// Build the <body> for the module
// Create output
$pageContent = '';
$pageContent .= '<form action="' . htmlspecialchars($this->filelist->listURL()) . '" method="post" name="dblistForm">';
$pageContent .= $this->filelist->HTMLcode;
$pageContent .= '<input type="hidden" name="cmd" /></form>';
// Making listing options:
if ($this->filelist->HTMLcode) {
$pageContent .= '
<!--
Listing options for extended view, clipboard and thumbnails
-->
<div id="typo3-listOptions">
';
// Add "display bigControlPanel" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
$pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />';
}
// Add "display thumbnails" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
$pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />';
}
// Add "clipboard" checkbox:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
$pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>';
}
$pageContent .= '
</div>
';
// Set clipboard:
if ($this->MOD_SETTINGS['clipBoard']) {
$pageContent .= $this->filelist->clipObj->printClipboard();
$pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
}
}
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => ($this->errorMessage ? $this->errorMessage->render() : '') . $pageContent);
$this->content = $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('files'), $this->content);
} else {
$content = '';
if ($this->errorMessage) {
$this->errorMessage->setSeverity(\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$content = $this->doc->moduleBody(array(), array_merge(array('LEVEL_UP' => '', 'REFRESH' => ''), $this->getButtons()), array('CSH' => '', 'TITLE' => '', 'FOLDER_INFO' => '', 'PAGE_ICON' => '', 'FUNC_MENU' => '', 'CONTENT' => $this->errorMessage->render()));
}
// Create output - no access (no warning though)
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('files'), $content);
}
}
示例14: main
//.........这里部分代码省略.........
if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
if(DTM_origClass=="") {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
} else {
DTM_origClass = "tab";
}
top.DTM_currentTabs[idBase] = -1;
} else {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
if(DTM_origClass=="") {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
} else {
DTM_origClass = "tabact";
}
top.DTM_currentTabs[idBase] = index;
}
}
}
function DTM_toggle(idBase,index,isInit) { //
// Showing one:
if (document.getElementById(idBase+"-"+index+"-DIV")) {
if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
} else {
DTM_origClass = "tab";
}
top.DTM_currentTabs[idBase+"-"+index] = 0;
} else {
document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
} else {
DTM_origClass = "tabact";
}
top.DTM_currentTabs[idBase+"-"+index] = 1;
}
}
}
function DTM_mouseOver(obj) { //
DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue;
obj.attributes.getNamedItem(\'class\').nodeValue += "_over";
}
function DTM_mouseOut(obj) { //
obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass;
DTM_origClass = "";
}
');
// Setting doc-header
$this->doc->form = '<form action="' . htmlspecialchars('db_layout.php?id=' . $this->id . '&imagemode=' . $this->imagemode) . '" method="post">';
// Creating the top function menu:
$this->topFuncMenu = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'], 'db_layout.php', '');
$this->languageMenu = count($this->MOD_MENU['language']) > 1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf:LGL.language', TRUE) . BackendUtility::getFuncMenu($this->id, 'SET[language]', $this->current_sys_language, $this->MOD_MENU['language'], 'db_layout.php', '') : '';
// Find backend layout / coumns
$backendLayout = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getSelectedBackendLayout', $this->id, $this);
if (count($backendLayout['__colPosList'])) {
$this->colPosList = implode(',', $backendLayout['__colPosList']);
}
// Removing duplicates, if any
$this->colPosList = implode(',', array_unique(GeneralUtility::intExplode(',', $this->colPosList)));
// Page title
$body = $this->doc->header($this->getLocalizedPageTitle());
$body .= $this->getHeaderFlashMessagesForCurrentPid();
// Render the primary module content:
if ($this->MOD_SETTINGS['function'] == 0) {
// QuickEdit
$body .= $this->renderQuickEdit();
} else {
// All other listings
$body .= $this->renderListContent();
}
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons($this->MOD_SETTINGS['function'] == 0 ? 'quickEdit' : '');
$markers = array('CSH' => $docHeaderButtons['csh'], 'TOP_FUNCTION_MENU' => $this->topFuncMenu . $this->editSelect, 'LANGSELECTOR' => $this->languageMenu, 'CONTENT' => $body);
// Build the <body> for the module
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
} else {
// If no access or id value, create empty document:
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout.html');
$this->doc->JScode = $this->doc->wrapScriptTags('
if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';
');
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('clickAPage_content'), $GLOBALS['LANG']->getLL('clickAPage_header'), FlashMessage::INFO);
$body = $flashMessage->render();
// Setting up the buttons and markers for docheader
$docHeaderButtons = array('view' => '', 'history_page' => '', 'new_content' => '', 'move_page' => '', 'move_record' => '', 'new_page' => '', 'edit_page' => '', 'csh' => '', 'shortcut' => '', 'cache' => '', 'savedok' => '', 'savedokshow' => '', 'closedok' => '', 'deletedok' => '', 'undo' => '', 'history_record' => '', 'edit_language' => '');
$markers = array('CSH' => BackendUtility::cshItem($this->descrTable, '', $GLOBALS['BACK_PATH'], '', TRUE), 'TOP_FUNCTION_MENU' => '', 'LANGSELECTOR' => '', 'CONTENT' => $body);
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
}
}