2 namespace TYPO3\CMS\Backend\Template;
81 function jumpToUrl(URL) {
82 window.location.href = URL;
273 'generatedSprites' =>
'../typo3temp/sprites/'
282 'structure' =>
'Resources/Public/Css/structure/',
283 'visual' =>
'Resources/Public/Css/visual/'
395 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/LegacyCssClasses');
403 $this->scriptID = preg_replace(
'/^.*\\/(sysext|ext)\\//',
'ext/',
$GLOBALS[
'TBE_MODULES'][
'_PATHS'][$temp_M] .
'index.php');
405 $this->scriptID = preg_replace(
'/^.*\\/(sysext|ext)\\//',
'ext/', \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(PATH_thisScript));
407 if (TYPO3_mainDir !=
'typo3/' && substr($this->scriptID, 0, strlen(TYPO3_mainDir)) == TYPO3_mainDir) {
409 $this->scriptID =
'typo3/' . substr($this->scriptID, strlen(TYPO3_mainDir));
411 $this->bodyTagId = preg_replace(
'/[^A-Za-z0-9-]/',
'-', $this->scriptID);
413 if (is_array(
$GLOBALS[
'TBE_STYLES'][
'scriptIDindex'][$this->scriptID])) {
417 \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS[
'TBE_STYLES'], $ovr);
419 unset(
$GLOBALS[
'TBE_STYLES'][
'scriptIDindex'][$this->scriptID]);
422 if (
$GLOBALS[
'TBE_STYLES'][
'stylesheet']) {
423 $this->styleSheetFile =
$GLOBALS[
'TBE_STYLES'][
'stylesheet'];
425 if (
$GLOBALS[
'TBE_STYLES'][
'stylesheet2']) {
426 $this->styleSheetFile2 =
$GLOBALS[
'TBE_STYLES'][
'stylesheet2'];
428 if (
$GLOBALS[
'TBE_STYLES'][
'styleSheetFile_post']) {
429 $this->styleSheetFile_post =
$GLOBALS[
'TBE_STYLES'][
'styleSheetFile_post'];
431 if (
$GLOBALS[
'TBE_STYLES'][
'inDocStyles_TBEstyle']) {
432 $this->inDocStylesArray[
'TBEstyle'] =
$GLOBALS[
'TBE_STYLES'][
'inDocStyles_TBEstyle'];
436 $this->addStylesheetDirectory($stylesheetDirectory);
439 if (
$GLOBALS[
'TBE_STYLES'][
'background']) {
449 if ($this->pageRenderer !== null) {
453 $this->pageRenderer->setLanguage(
$GLOBALS[
'LANG']->lang);
454 $this->pageRenderer->enableConcatenateFiles();
455 $this->pageRenderer->enableCompressCss();
456 $this->pageRenderer->enableCompressJavascript();
458 foreach ($this->jsFilesNoConcatenation as $file) {
459 $this->pageRenderer->addJsFile(
469 foreach ($this->jsFiles as $file) {
470 $this->pageRenderer->addJsFile(
$GLOBALS[
'BACK_PATH'] . $file);
472 if ((
int)
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'debug'] === 1) {
473 $this->pageRenderer->enableDebugMode();
498 $this->extDirectStateProvider =
true;
522 public function wrapClickMenuOnIcon($content, $table, $uid = 0, $listFr =
true, $addParams =
'', $enDisItems =
'', $returnTagParameters =
false)
541 $str = BackendUtility::getListViewLink(array(
544 ),
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.showList'));
580 public function getHeader($table, $row, $path, $noViewPageIcon =
false, $tWrap = array(
'',
''), $enableClickMenu =
true)
583 if (is_array($row) && $row[
'uid']) {
584 $iconImgTag =
'<span title="' . htmlspecialchars($path) .
'">' . $this->iconFactory->getIconForRecord($table, $row,
Icon::SIZE_SMALL)->render() .
'</span>';
586 $viewPage = $noViewPageIcon ?
'' : $this->
viewPageIcon($row[
'uid']);
588 $iconImgTag =
'<span title="' . htmlspecialchars($path) .
'">' . $this->iconFactory->getIcon(
'apps-pagetree-page-domain',
Icon::SIZE_SMALL)->render() .
'</span>';
589 $title =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'sitename'];
592 if ($enableClickMenu) {
596 return '<span class="typo3-moduleHeader">' . $iconImgTag . $viewPage . $tWrap[0] . htmlspecialchars(
GeneralUtility::fixed_lgd_cs($title, 45)) . $tWrap[1] .
'</span>';
608 public function getResourceHeader(\TYPO3\CMS\Core\Resource\ResourceInterface $resource, $tWrap = array(
'',
''), $enableClickMenu =
true)
611 $path = $resource->getStorage()->getName() . $resource->getParentFolder()->getIdentifier();
612 $iconImgTag =
'<span title="' . htmlspecialchars($path) .
'">' . $this->iconFactory->getIconForResource($resource,
Icon::SIZE_SMALL)->render() .
'</span>';
613 }
catch (\TYPO3\CMS\Core\Resource\
Exception\ResourceDoesNotExistException $e) {
617 if ($enableClickMenu && ($resource instanceof \TYPO3\CMS\Core\Resource\File)) {
618 $metaData = $resource->_getMetaData();
622 return '<span class="typo3-moduleHeader">' . $iconImgTag . $tWrap[0] . htmlspecialchars(
GeneralUtility::fixed_lgd_cs($resource->getName(), 45)) . $tWrap[1] .
'</span>';
635 public function makeShortcutIcon($gvList, $setList, $modName, $motherModName =
'', $classes =
'')
637 $gvList =
'route,' . $gvList;
642 $moduleName = $modName ===
'xMOD_alt_doc.php' ?
'record_edit' : $modName;
645 $storeUrl =
'&M=' . $moduleName . $storeUrl;
647 if ((
int)$motherModName === 1) {
648 $motherModule =
'top.currentModuleLoaded';
649 }
elseif ($motherModName) {
652 $motherModule =
'\'\
'';
656 $shortcutUrl = $pathInfo[
'path'] .
'?' . $storeUrl;
659 if ($shortcutExist) {
660 return '<a class="active ' . htmlspecialchars($classes) .
'" title="">' .
661 $this->iconFactory->getIcon(
'actions-system-shortcut-active',
Icon::SIZE_SMALL)->render() .
'</a>';
665 ', ' .
$url .
', ' . $confirmationText .
', ' . $motherModule .
', this);return false;';
667 return '<a href="#" class="' . htmlspecialchars($classes) .
'" onclick="' . htmlspecialchars($onClick) .
'" title="' .
668 $GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.makeBookmark',
true) .
'">' .
669 $this->iconFactory->getIcon(
'actions-system-shortcut-new',
Icon::SIZE_SMALL)->render() .
'</a>';
700 public function formWidth($size = 48, $textarea =
false, $styleOverride =
'')
702 return ' style="' . ($styleOverride ?:
'width:' . ceil($size * 9.58) .
'px;') .
'"';
743 $dateStr = date(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'hhmm'], $tstamp);
746 $dateStr = date(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'ddmmyy'], $tstamp);
762 if ($this->parseTimeFlag &&
$GLOBALS[
'BE_USER']->isAdmin()) {
796 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'preStartPageHook'])) {
797 $preStartPageHook = &
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'preStartPageHook'];
798 if (is_array($preStartPageHook)) {
799 $hookParameters = array(
802 foreach ($preStartPageHook as $hookFunction) {
808 if ($this->pageHeaderFooterTemplateFile) {
811 $this->pageRenderer->setTemplateFile($file);
816 $this->pageRenderer->setRenderXhtml(
false);
818 $languageCode = $this->pageRenderer->getLanguage() ===
'default' ?
'en' : $this->pageRenderer->getLanguage();
819 $this->pageRenderer->setHtmlTag(
'<html lang="' . $languageCode .
'">');
821 $headerStart =
'<!DOCTYPE html>';
822 $this->pageRenderer->setXmlPrologAndDocType($headerStart);
823 $this->pageRenderer->setHeadTag(
'<head>' . LF .
'<!-- TYPO3 Script ID: ' . htmlspecialchars($this->scriptID) .
' -->');
824 header(
'Content-Type:text/html;charset=utf-8');
825 $this->pageRenderer->setCharSet(
'utf-8');
826 $this->pageRenderer->addMetaTag($this->
generator());
827 $this->pageRenderer->addMetaTag(
'<meta name="robots" content="noindex,follow">');
828 $this->pageRenderer->addMetaTag(
'<meta charset="utf-8">');
829 $this->pageRenderer->addMetaTag(
'<meta name="viewport" content="width=device-width, initial-scale=1">');
832 $this->pageRenderer->addMetaTag($this->
xUaCompatible($this->xUaCompatibilityVersion));
834 $this->pageRenderer->setTitle($title);
837 if ($this->extDirectStateProvider) {
838 $this->pageRenderer->addJsFile(
'sysext/backend/Resources/Public/JavaScript/ExtDirect.StateProvider.js');
840 $this->pageRenderer->addHeaderData($this->JScode);
841 foreach ($this->JScodeArray as $name => $code) {
842 $this->pageRenderer->addJsInlineCode($name, $code,
false);
844 if (!empty($this->JScodeLibArray)) {
845 GeneralUtility::deprecationLog(
'DocumentTemplate->JScodeLibArray is deprecated since TYPO3 CMS 7. Use the functionality within pageRenderer directly');
846 foreach ($this->JScodeLibArray as $library) {
847 $this->pageRenderer->addHeaderData($library);
850 if ($this->extJScode) {
851 $this->pageRenderer->addExtOnReadyCode($this->extJScode);
855 $this->pageRenderer->loadJquery();
859 $this->pageRenderer->addJsFile(
'sysext/core/Resources/Public/JavaScript/Contrib/bootstrap/bootstrap.js');
862 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'preHeaderRenderHook'])) {
863 $preHeaderRenderHook = &
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'preHeaderRenderHook'];
864 if (is_array($preHeaderRenderHook)) {
865 $hookParameters = array(
866 'pageRenderer' => &$this->pageRenderer
868 foreach ($preHeaderRenderHook as $hookFunction) {
875 $this->JScode = ($this->extJScode =
'');
876 $this->JScodeArray = array();
880 <!-- Wrapping DIV-section for whole page BEGIN -->
881 <div class="' . $this->divClass .
'">
882 ' :
'') . trim($this->form);
897 if (ob_get_contents()) {
898 $str .= ob_get_clean();
899 if (!headers_sent()) {
900 header(
'Content-Encoding: None');
903 $str .= ($this->divClass ?
'
905 <!-- Wrapping DIV-section for whole page END -->
906 </div>' :
'') . $this->endOfPageJsBlock;
910 GeneralUtility::devLog(
'END of BACKEND session', \TYPO3\CMS\Backend\Template\DocumentTemplate::class, 0, array(
'_FLUSH' =>
true));
925 $pageContent .= $content;
926 $pageContent .= $this->
endPage();
941 <!-- MAIN Header in page top -->
942 <h1 class="t3js-title-inlineedit">' . htmlspecialchars($text) .
'</h1>
959 public function section($label, $text, $nostrtoupper =
false, $sH =
false, $type = 0, $allowHTMLinHeader =
false)
964 if (!$allowHTMLinHeader) {
965 $label = htmlspecialchars($label);
967 $str .= $this->
sectionHeader($this->
icons($type) . $label, $sH, $nostrtoupper ?
'' :
' class="uppercase"');
972 <!-- Section content -->
990 <hr style="margin-top: ' . $dist .
'px; margin-bottom: ' . $dist .
'px;" />
1008 <!-- Spacer element -->
1009 <div style="padding-top: ' . (int)$dist .
'px;"></div>
1025 $tag = $sH ?
'h2' :
'h3';
1026 if ($addAttrib && $addAttrib[0] !==
' ') {
1027 $addAttrib =
' ' . $addAttrib;
1031 <!-- Section header -->
1032 <' . $tag . $addAttrib .
'>' . $label .
'</' . $tag .
'>
1046 if (!$this->sectionFlag) {
1047 $this->sectionFlag = 1;
1050 <!-- ***********************
1051 Begin output section.
1052 *********************** -->
1070 if ($this->sectionFlag) {
1071 $this->sectionFlag = 0;
1074 <!-- *********************
1076 ********************* -->
1104 return '<body ' . trim($this->bodyTagAdditions . ($this->bodyTagId ?
' id="' . $this->bodyTagId .
'"' :
'')) .
'>';
1118 $this->inDocStylesArray = array();
1120 if ($this->styleSheetFile) {
1121 $this->pageRenderer->addCssFile($this->styleSheetFile);
1123 if ($this->styleSheetFile2) {
1124 $this->pageRenderer->addCssFile($this->styleSheetFile2);
1128 $this->pageRenderer->addCssInlineBlock(
'inDocStyles',
$inDocStyles . LF .
'/*###POSTCSSMARKER###*/');
1131 if ($this->styleSheetFile_post) {
1132 $this->pageRenderer->addCssFile($this->styleSheetFile_post);
1145 public function addStyleSheet($key, $href, $title =
'', $relation =
'stylesheet')
1147 $this->pageRenderer->addCssFile($href, $relation,
'screen', $title);
1165 foreach ($files as $file) {
1166 $this->pageRenderer->addCssFile(
$GLOBALS[
'BACK_PATH'] . $path . $file,
'stylesheet',
'all');
1179 $styles = LF . implode(LF, $this->inDocStylesArray);
1180 $content = str_replace(
'/*###POSTCSSMARKER###*/', $styles, $content);
1183 $jscode = $this->JScode . LF . $this->
wrapScriptTags(implode(LF, $this->JScodeArray));
1184 $content = str_replace(
'<!--###POSTJSMARKER###-->', $jscode, $content);
1195 $stylesheetDirectories = array();
1197 foreach ($this->stylesheetsCore as $stylesheetDir) {
1198 $stylesheetDirectories[] = $stylesheetDir;
1202 if (is_array(
$GLOBALS[
'TBE_STYLES'][
'skins'])) {
1204 foreach (
$GLOBALS[
'TBE_STYLES'][
'skins'] as $skinExtKey => $skin) {
1208 if (is_array($skin[
'stylesheetDirectories'])) {
1209 $skinStylesheetDirs = array_merge($skinStylesheetDirs, $skin[
'stylesheetDirectories']);
1212 foreach ($skinStylesheetDirs as $stylesheetDir) {
1214 if (substr($stylesheetDir, 0, 4) ===
'EXT:') {
1215 list($extKey, $path) = explode(
'/', substr($stylesheetDir, 4), 2);
1226 return $stylesheetDirectories;
1236 $str =
'TYPO3 CMS, ' . TYPO3_URL_GENERAL .
', © Kasper Skårhøj ' . TYPO3_copyright_year .
', extensions are copyright of their respective owners.';
1237 return '<meta name="generator" content="' . $str .
'" />';
1248 return '<meta http-equiv="X-UA-Compatible" content="' . $content .
'" />';
1270 public function icons($type, $styleAttribValue =
'')
1273 case self::STATUS_ICON_ERROR:
1274 $icon =
'status-dialog-error';
1276 case self::STATUS_ICON_WARNING:
1277 $icon =
'status-dialog-warning';
1279 case self::STATUS_ICON_NOTIFICATION:
1280 $icon =
'status-dialog-notification';
1282 case self::STATUS_ICON_OK:
1283 $icon =
'status-dialog-ok';
1302 $button =
'<input class="btn btn-default" type="submit" onclick="' . htmlspecialchars($onClick) .
'; return false;" value="' . htmlspecialchars($label) .
'" />';
1316 return '<span class="text-muted">' . $string .
'</span>';
1329 return '<span class="text-danger">' . $string .
'</span>';
1340 $string =
'/*<![CDATA[*/' . $string .
'/*]]>*/';
1355 if (trim($string)) {
1357 $cr = $linebreak ? LF :
'';
1359 $string = ltrim($string, LF);
1361 if ($string[0] === TAB) {
1362 $string = TAB . ltrim($string, TAB);
1364 $string = $cr .
'<script type="text/javascript">
1370 return trim($string);
1377 'defCol' => array(
'<td valign="top">',
'</td>')
1383 public $table_TABLE =
'<table border="0" cellspacing="0" cellpadding="0" class="typo3-dblist" id="typo3-tmpltable">';
1394 public function table($data, $layout = null)
1398 if (is_array($data)) {
1401 foreach ($data as $tableRow) {
1402 if ($rowCount % 2) {
1409 if (is_array($tableRow)) {
1411 foreach ($tableRow as $tableCell) {
1412 $cellWrap = is_array($layout[$cellCount]) ? $layout[$cellCount] : $layout[
'defCol'];
1413 $cellWrap = is_array($rowLayout[
'defCol']) ? $rowLayout[
'defCol'] : $cellWrap;
1414 $cellWrap = is_array($rowLayout[$cellCount]) ? $rowLayout[$cellCount] : $cellWrap;
1415 $rowResult .= $cellWrap[0] . $tableCell . $cellWrap[1];
1419 $rowWrap = is_array($layout[
'tr']) ? $layout[
'tr'] : array($this->table_TR,
'</tr>');
1420 $rowWrap = is_array($rowLayout[
'tr']) ? $rowLayout[
'tr'] : $rowWrap;
1421 $result .= $rowWrap[0] . $rowResult . $rowWrap[1];
1425 $result = $tableWrap[0] . $result . $tableWrap[1];
1439 public function menuTable($arr1, $arr2 = array(), $arr3 = array())
1442 $rows = max(array(count($arr1), count($arr2), count($arr3)));
1444 <table border="0" cellpadding="0" cellspacing="0" id="typo3-tablemenu">';
1445 for ($a = 0; $a < $rows; $a++) {
1449 $cls[] =
'<td valign="' . $valign .
'">' . $arr1[$a][0] .
'</td><td>' . $arr1[$a][1] .
'</td>';
1450 if (!empty($arr2)) {
1451 $cls[] =
'<td valign="' . $valign .
'">' . $arr2[$a][0] .
'</td><td>' . $arr2[$a][1] .
'</td>';
1452 if (!empty($arr3)) {
1453 $cls[] =
'<td valign="' . $valign .
'">' . $arr3[$a][0] .
'</td><td>' . $arr3[$a][1] .
'</td>';
1456 $menu .= implode($cls,
'<td> </td>');
1476 <table border="0" cellpadding="0" cellspacing="0" width="100%" id="typo3-funcmenu">
1478 <td valign="top" nowrap="nowrap">' . $content .
'</td>
1479 <td valign="top" align="right" nowrap="nowrap">' . $menu .
'</td>
1493 $this->pageRenderer->addJsFile($lib);
1503 $this->pageRenderer->loadJquery();
1504 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/ClickMenu');
1517 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/LegacyTree',
'function() {
1518 DragDrop.table = "' . $table .
'";
1519 ' . $additionalJavaScriptCode .
'
1537 public function getTabMenu($mainParams, $elementName, $currentValue, $menuItems, $script =
'', $addparams =
'')
1540 if (is_array($menuItems)) {
1541 if (!is_array($mainParams)) {
1542 $mainParams = array(
'id' => $mainParams);
1546 $script = basename(PATH_thisScript);
1549 foreach ($menuItems as $value => $label) {
1550 $menuDef[$value][
'isActive'] = (string)$currentValue === (
string)$value;
1551 $menuDef[$value][
'label'] = htmlspecialchars($label, ENT_COMPAT,
'UTF-8',
false);
1552 $menuDef[$value][
'url'] = $script .
'?' . $mainParams . $addparams .
'&' . $elementName .
'=' . $value;
1568 if (!is_array($menuItems)) {
1573 foreach ($menuItems as $id => $def) {
1574 $class = $def[
'isActive'] ?
'active' :
'';
1575 $label = $def[
'label'];
1576 $url = htmlspecialchars($def[
'url']);
1577 $params = $def[
'addParams'];
1579 $options .=
'<li class="' . $class .
'">' .
1580 '<a href="' .
$url .
'" ' . $params .
'>' . $label .
'</a>' .
1584 return '<ul class="nav nav-tabs" role="tablist">' .
1601 public function getDynamicTabMenu(array $menuItems, $identString, $defaultTabIndex = 1, $collapseable =
false, $wrapContent =
true, $storeLastActiveTab =
true)
1604 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/Tabs');
1605 $templatePathAndFileName =
'EXT:backend/Resources/Private/Templates/DocumentTemplate/' . ($collapseable ?
'Collapse.html' :
'Tabs.html');
1608 $view->assignMultiple(array(
1610 'items' => $menuItems,
1611 'defaultTabIndex' => $defaultTabIndex,
1612 'wrapContent' => $wrapContent,
1613 'storeLastActiveTab' => $storeLastActiveTab,
1614 'BACK_PATH' =>
$GLOBALS[
'BACK_PATH']
1616 return $view->render();
1634 public function getDynTabMenu($menuItems, $identString, $toggle = 0, $foldout =
false, $noWrap =
true, $fullWidth =
false, $defaultTabIndex = 1, $tabBehaviour = 1)
1637 return $this->
getDynamicTabMenu($menuItems, $identString, $defaultTabIndex, $foldout, $noWrap);
1669 return $versionGuiObj->getVersionSelector($id, $noAction);
1683 $this->moduleTemplateFilename =
$filename;
1695 if ($filename !==
'') {
1698 return $htmlTemplate;
1722 public function moduleBody($pageRecord = array(), $buttons = array(), $markerArray = array(), $subpartArray = array())
1725 $moduleBody = $this->templateService->getSubpart($this->moduleTemplate,
'###FULLDOC###');
1727 $this->inDocStylesArray[] =
'html { overflow: hidden; }';
1729 $markerArray[
'PAGEPATH'] = $this->
getPagePath($pageRecord);
1731 $markerArray[
'PAGEINFO'] = $this->
getPageInfo($pageRecord);
1735 $markerArray = array_merge($markerArray, $docHeaderButtons);
1737 foreach ($subpartArray as $marker => $content) {
1738 $moduleBody = $this->templateService->substituteSubpart($moduleBody, $marker, $content);
1741 if ($this->showFlashMessages) {
1742 $flashMessages = $this->getFlashMessages();
1743 if (!empty($flashMessages)) {
1744 $markerArray[
'FLASHMESSAGES'] = $flashMessages;
1747 if (strpos($moduleBody,
'###FLASHMESSAGES###') ===
false) {
1748 $moduleBody = str_replace(
'###CONTENT###',
'###FLASHMESSAGES######CONTENT###', $moduleBody);
1753 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'moduleBodyPostProcess'])) {
1755 'moduleTemplateFilename' => &$this->moduleTemplateFilename,
1756 'moduleTemplate' => &$this->moduleTemplate,
1757 'moduleBody' => &$moduleBody,
1758 'markers' => &$markerArray,
1759 'parentObject' => &$this
1761 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'moduleBodyPostProcess'] as $funcRef) {
1766 return $this->templateService->substituteMarkerArray($moduleBody, $markerArray,
'###|###');
1774 public function getFlashMessages()
1779 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
1780 return $defaultFlashMessageQueue->renderFlashMessages();
1795 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
1796 $flashMessages = $defaultFlashMessageQueue->getAllMessagesAndFlush();
1799 foreach ($flashMessages as $flashMessage) {
1801 'title' => $flashMessage->getTitle(),
1802 'message' => $flashMessage->getMessage(),
1803 'severity' => $flashMessage->getSeverity()
1807 $response->
getBody()->write(json_encode($messages));
1821 $floats = array(
'left',
'right');
1822 foreach ($floats as $key) {
1824 $buttonTemplate = $this->templateService->getSubpart($this->moduleTemplate,
'###BUTTON_GROUPS_' . strtoupper($key) .
'###');
1826 $buttonTemplate = $this->templateService->substituteMarkerArray($buttonTemplate, $buttons,
'###|###',
true);
1828 $buttonWrap = $this->templateService->getSubpart($this->moduleTemplate,
'###BUTTON_GROUP_WRAP###');
1830 for ($groupNumber = 1; $groupNumber < 6; $groupNumber++) {
1831 $buttonMarker =
'###BUTTON_GROUP' . $groupNumber .
'###';
1832 $buttonGroup = $this->templateService->getSubpart($buttonTemplate, $buttonMarker);
1833 if (trim($buttonGroup)) {
1835 $buttonGroup = $this->templateService->substituteMarker($buttonWrap,
'###BUTTONS###', $buttonGroup);
1837 $buttonTemplate = $this->templateService->substituteSubpart($buttonTemplate, $buttonMarker, trim($buttonGroup));
1841 $markers[
'BUTTONLIST_' . strtoupper($key)] = str_replace(LF,
'', $buttonTemplate);
1844 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'docHeaderButtonsHook'])) {
1846 'buttons' => $buttons,
1847 'markers' => &$markers,
1850 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/template.php'][
'docHeaderButtonsHook'] as $funcRef) {
1866 if (is_array($pageRecord) && $pageRecord[
'uid']) {
1867 $title = substr($pageRecord[
'_thePathFull'], 0, -1);
1869 $pos = strrpos($title, $pageRecord[
'title']);
1870 if ($pos !==
false) {
1871 $title = substr($title, 0, $pos);
1877 $pagePath =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.path',
true) .
': <span class="typo3-docheader-pagePath">';
1879 $cropLength = empty(
$GLOBALS[
'BE_USER']->uc[
'titleLen']) ? 50 :
$GLOBALS[
'BE_USER']->uc[
'titleLen'];
1881 if ($croppedTitle !== $title) {
1882 $pagePath .=
'<abbr title="' . htmlspecialchars($title) .
'">' . htmlspecialchars($croppedTitle) .
'</abbr>';
1884 $pagePath .= htmlspecialchars($title);
1886 $pagePath .=
'</span>';
1900 if (is_array($pageRecord) && $pageRecord[
'uid']) {
1902 $iconImg =
'<span title="' . htmlspecialchars($alttext) .
'">' . $this->iconFactory->getIconForRecord(
'pages', $pageRecord,
Icon::SIZE_SMALL)->render() .
'</span>';
1905 $uid = $pageRecord[
'uid'];
1910 $iconImg =
'<span title="' . htmlspecialchars(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'sitename']) .
'">' . $this->iconFactory->getIcon(
'apps-pagetree-root',
Icon::SIZE_SMALL)->render() .
'</span>';
1911 if (
$GLOBALS[
'BE_USER']->user[
'admin']) {
1914 $theIcon = $iconImg;
1917 $title =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'sitename'];
1920 $pageInfo = $theIcon .
'<strong>' . htmlspecialchars($title) .
' [' . $uid .
']</strong>';
1934 public function collapseableSection($title, $html, $id, $saveStatePointer =
'')
1937 $hasSave = (bool)$saveStatePointer;
1938 $collapsedStyle = ($collapsedClass =
'');
1942 $value = $userSettingsController->process(
'get', $saveStatePointer .
'.' . $id);
1944 $collapsedStyle =
' style="display: none"';
1945 $collapsedClass =
' collapsed';
1947 $collapsedStyle =
'';
1948 $collapsedClass =
' expanded';
1951 $this->pageRenderer->loadExtJS();
1952 $this->pageRenderer->addExtOnReadyCode(
'
1953 Ext.select("h2.section-header").each(function(element){
1954 element.on("click", function(event, tag) {
1957 div = el.next("div"),
1958 saveKey = el.getAttribute("rel");
1959 if (el.hasClass("collapsed")) {
1960 el.removeClass("collapsed").addClass("expanded");
1966 el.removeClass("expanded").addClass("collapsed");
1977 top.TYPO3.Storage.Persistent.set(saveKey + "." + tag.id, state);
1984 <h2 id="' . $id .
'" class="section-header' . $collapsedClass .
'" rel="' . $saveStatePointer .
'"> ' . $title .
'</h2>
1985 <div' . $collapsedStyle .
'>' . $html .
'</div>
1996 return $GLOBALS[
'TBE_STYLES'][
'favicon'] ?:
'sysext/backend/Resources/Public/Icons/favicon.ico';