2 namespace TYPO3\CMS\Backend\Template;
27 use TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException;
219 $this->view->assign(
'content',
$content);
251 $this->view->setPartialRootPaths($this->partialRootPaths);
252 $this->view->setTemplateRootPaths($this->templateRootPaths);
253 $this->view->setLayoutRootPaths($this->layoutRootPaths);
254 $this->view->setTemplate($this->templateFile);
267 $this->pageRenderer->loadJquery();
268 $this->pageRenderer->loadRequireJsModule(
'bootstrap');
269 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/ContextHelp');
270 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/DocumentHeader');
271 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/SplitButtons');
281 if (
$GLOBALS[
'TBE_STYLES'][
'stylesheet']) {
282 $this->pageRenderer->addCssFile(
$GLOBALS[
'TBE_STYLES'][
'stylesheet']);
284 if (
$GLOBALS[
'TBE_STYLES'][
'stylesheet2']) {
285 $this->pageRenderer->addCssFile(
$GLOBALS[
'TBE_STYLES'][
'stylesheet2']);
297 $this->pageRenderer->setXmlPrologAndDocType(
'<!DOCTYPE html>');
298 $this->pageRenderer->setCharSet(
'utf-8');
299 $this->pageRenderer->setLanguage(
'default');
300 $this->pageRenderer->addMetaTag(
'<meta name="viewport" content="width=device-width, initial-scale=1">');
310 foreach ($this->javascriptCodeArray as $name => $code) {
311 $this->pageRenderer->addJsInlineCode($name, $code,
false);
325 $this->javascriptCodeArray[$name] = $code;
346 $this->pageRenderer->setTitle($this->title);
351 $this->view->assign(
'docHeader', $this->docHeaderComponent->docHeaderContent());
352 if ($this->moduleId) {
353 $this->view->assign(
'moduleId', $this->moduleId);
355 if ($this->moduleName) {
356 $this->view->assign(
'moduleName', $this->moduleName);
358 $this->view->assign(
'flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());
361 $renderedPage .= $this->view->render();
365 return $renderedPage;
387 $this->view->assign(
'formTag', $formTag);
422 if (isset(
$GLOBALS[
'TBE_MODULES_EXT'][$moduleMenuIdentifier])) {
424 $GLOBALS[
'TBE_MODULES_EXT'][$moduleMenuIdentifier][
'MOD_MENU'][
'function'];
426 foreach ($menuEntries as $menuEntry) {
427 $menuItem = $menu->makeMenuItem()
428 ->setTitle($menuEntry[
'title'])
430 $menu->addMenuItem($menuItem);
432 $this->docHeaderComponent->getMenuRegistry()->addMenu($menu);
453 public function getDynamicTabMenu(array $menuItems, $domId, $defaultTabIndex = 1, $collapsible =
false, $wrapContent =
true, $storeLastActiveTab =
true)
455 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Backend/Tabs');
456 $templatePathAndFileName =
'EXT:backend/Resources/Private/Templates/DocumentTemplate/' . ($collapsible ?
'Collapse.html' :
'Tabs.html');
459 $view->assignMultiple(array(
461 'items' => $menuItems,
462 'defaultTabIndex' => $defaultTabIndex,
463 'wrapContent' => $wrapContent,
464 'storeLastActiveTab' => $storeLastActiveTab,
466 return $view->render();
494 $this->pageRenderer->addJsFile($lib);
520 public function makeShortcutIcon($gvList, $setList, $modName, $motherModName =
'', $displayName =
'', $classes =
'btn btn-default btn-sm')
522 $gvList =
'route,' . $gvList;
529 $moduleName = $modName ===
'xMOD_alt_doc.php' ?
'record_edit' : $modName;
532 $storeUrl =
'&M=' . $moduleName . $storeUrl;
534 if ((
int)$motherModName === 1) {
535 $motherModule =
'top.currentModuleLoaded';
536 }
elseif ($motherModName) {
539 $motherModule =
'\'\
'';
542 $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.makeBookmark')
545 $shortcutUrl = $pathInfo[
'path'] .
'?' . $storeUrl;
548 if ($shortcutExist) {
549 return '<a class="active ' . htmlspecialchars($classes) .
'" title="">' .
550 $this->iconFactory->getIcon(
'actions-system-shortcut-active',
Icon::SIZE_SMALL)->render() .
'</a>';
557 return '<a href="#" class="' . htmlspecialchars($classes) .
'" onclick="' . htmlspecialchars($onClick) .
'" title="' .
558 $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.makeBookmark',
true) .
'">' .
559 $this->iconFactory->getIcon(
'actions-system-shortcut-new',
Icon::SIZE_SMALL)->render() .
'</a>';
577 $storeArray = array_merge(
594 public function getVersionSelector($id, $noAction =
false)
605 return $versionGuiObj->getVersionSelector($id, $noAction);
627 public function section($label, $text, $noStrToUpper =
false, $sH =
false, $type = 0, $allowHtmlInHeader =
false)
632 if (!$allowHtmlInHeader) {
633 $label = htmlspecialchars($label);
635 $str .= $this->
sectionHeader($this->
icons($type) . $label, $sH, $noStrToUpper ?
'' :
' class="uppercase"');
640 <!-- Section content -->
660 <hr style="margin-top: ' . $dist .
'px; margin-bottom: ' . $dist .
'px;" />
678 $tag = $sH ?
'h2' :
'h3';
679 if ($addAttribute && $addAttribute[0] !==
' ') {
680 $addAttribute =
' ' . $addAttribute;
684 <!-- Section header -->
685 <' . $tag . $addAttribute .
'>' . $label .
'</' . $tag .
'>
703 if (!$this->sectionFlag) {
704 $this->sectionFlag = 1;
707 <!-- ***********************
708 Begin output section.
709 *********************** -->
728 if ($this->sectionFlag) {
729 $this->sectionFlag = 0;
732 <!-- *********************
734 ********************* -->
780 case self::STATUS_ICON_ERROR:
781 $icon =
'status-dialog-error';
783 case self::STATUS_ICON_WARNING:
784 $icon =
'status-dialog-warning';
786 case self::STATUS_ICON_NOTIFICATION:
787 $icon =
'status-dialog-notification';
789 case self::STATUS_ICON_OK:
790 $icon =
'status-dialog-ok';
837 <!-- MAIN Header in page top -->
838 <h1 class="t3js-title-inlineedit">' . htmlspecialchars($text) .
'</h1>
855 if (!is_string($messageBody)) {
856 throw new \InvalidArgumentException(
'The message body must be of type string, "' . gettype($messageBody) .
'" given.', 1446483133);
860 \TYPO3\CMS\Core\Messaging\FlashMessage::class,
866 $this->getFlashMessageQueue()->enqueue($flashMessage);
880 protected function getFlashMessageQueue()
882 if (!isset($this->flashMessageQueue)) {
885 $this->flashMessageQueue = $service->getMessageQueueByIdentifier();