‪TYPO3CMS  9.5
TypoScriptTemplateModuleController.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Psr\Http\Message\ResponseInterface;
18 use Psr\Http\Message\ServerRequestInterface;
44 
50 {
53 
58  'textExtensions' => 'Using TypoScriptTemplateModuleController::$textExtensions is deprecated and will not be possible anymore in TYPO3 v10.0.',
59  'pageinfo' => 'Using TypoScriptTemplateModuleController::$pageinfo is deprecated and will not be possible anymore in TYPO3 v10.0.',
60  'id' => 'Using TypoScriptTemplateModuleController::$id is deprecated and will not be possible anymore in TYPO3 v10.0.',
61  'modTSconfig' => 'Using TypoScriptTemplateModuleController::$modTSconfig is deprecated and will not be possible anymore in TYPO3 v10.0.',
62  'content' => 'Using TypoScriptTemplateModuleController::$content is deprecated and will not be possible anymore in TYPO3 v10.0.',
63  'extObj' => 'Using TypoScriptTemplateModuleController::$extObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
64  'access' => 'Using TypoScriptTemplateModuleController::$access is deprecated and will not be possible anymore in TYPO3 v10.0.',
65  'perms_clause' => 'Using TypoScriptTemplateModuleController::$perms_clause is deprecated and will not be possible anymore in TYPO3 v10.0.',
66  'extClassConf' => 'Using TypoScriptTemplateModuleController::$extClassConf is deprecated and will not be possible anymore in TYPO3 v10.0.',
67  'edit' => 'Using TypoScriptTemplateModuleController::$edit is deprecated, property will be removed in TYPO3 v10.0.',
68  'modMenu_type' => 'Using TypoScriptTemplateModuleController::$modMenu_type is deprecated, property will be removed in TYPO3 v10.0.',
69  'MCONF' => 'Using TypoScriptTemplateModuleController::$MCONF is deprecated, property will be removed in TYPO3 v10.0.',
70  'CMD' => 'Using TypoScriptTemplateModuleController::$CMD is deprecated, property will be removed in TYPO3 v10.0.',
71  'sObj' => 'Using TypoScriptTemplateModuleController::$sObj is deprecated, property will be removed in TYPO3 v10.0.',
72  ];
73 
77  private ‪$deprecatedPublicMethods = [
78  'getExternalItemConfig' => 'Using TypoScriptTemplateModuleController::getExternalItemConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
79  'init' => 'Using TypoScriptTemplateModuleController::init() is deprecated and will not be possible anymore in TYPO3 v10.0.',
80  'clearCache' => 'Using TypoScriptTemplateModuleController::clearCache() is deprecated and will not be possible anymore in TYPO3 v10.0.',
81  'main' => 'Using TypoScriptTemplateModuleController::main() is deprecated and will not be possible anymore in TYPO3 v10.0.',
82  'setInPageArray' => 'Using TypoScriptTemplateModuleController::setInPageArray() is deprecated and will not be possible anymore in TYPO3 v10.0.',
83  'menuConfig' => 'Using TypoScriptTemplateModuleController::menuConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
84  'mergeExternalItems' => 'Using TypoScriptTemplateModuleController::mergeExternalItems() is deprecated and will not be possible anymore in TYPO3 v10.0.',
85  'handleExternalFunctionValue' => 'Using TypoScriptTemplateModuleController::handleExternalFunctionValue() is deprecated and will not be possible anymore in TYPO3 v10.0.',
86  'checkExtObj' => 'Using TypoScriptTemplateModuleController::checkExtObj() is deprecated and will not be possible anymore in TYPO3 v10.0.',
87  'extObjContent' => 'Using TypoScriptTemplateModuleController::extObjContent() is deprecated and will not be possible anymore in TYPO3 v10.0.',
88  'getExtObjContent' => 'Using TypoScriptTemplateModuleController::getExtObjContent() is deprecated and will not be possible anymore in TYPO3 v10.0.',
89  'checkSubExtObj' => 'Using TypoScriptTemplateModuleController::checkSubExtObj() is deprecated, method will be removed in TYPO3 v10.0.',
90  'extObjHeader' => 'Using TypoScriptTemplateModuleController::extObjHeader() is deprecated, method will be removed in TYPO3 v10.0.',
91  ];
92 
96  protected ‪$perms_clause;
97 
102  protected ‪$sObj;
103 
108  protected ‪$edit;
109 
114  protected ‪$textExtensions = 'html,htm,txt,css,tmpl,inc,js';
115 
120  protected ‪$modMenu_type = '';
121 
125  public ‪$modMenu_dontValidateList = '';
126 
130  public ‪$modMenu_setDefaultList = '';
131 
135  protected ‪$pageinfo = [];
136 
140  protected ‪$access = false;
141 
147  protected ‪$moduleName = 'web_ts';
148 
154  protected ‪$moduleTemplate;
155 
159  protected ‪$templateService;
160 
167  protected ‪$MCONF = [];
168 
172  protected ‪$id;
173 
180  protected ‪$CMD;
181 
188  public ‪$MOD_MENU = [
189  'function' => []
190  ];
191 
198  public ‪$MOD_SETTINGS = [];
199 
205  protected ‪$modTSconfig;
206 
213  protected ‪$extClassConf;
214 
220  protected ‪$content = '';
221 
228  protected ‪$extObj;
229 
233  public function ‪__construct()
234  {
235  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
236  $this->‪getLanguageService()->‪includeLLFile('EXT:tstemplate/Resources/Private/Language/locallang.xlf');
237 
238  // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
239  $this->MCONF = [
240  'name' => ‪$this->moduleName
241  ];
242  $this->moduleTemplate->addJavaScriptCode(
243  'jumpToUrl',
244  '
245  function jumpToUrl(URL) {
246  window.location.href = URL;
247  return false;
248  }
249  '
250  );
251  }
252 
256  protected function ‪init()
257  {
258  // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
259  $this->CMD = GeneralUtility::_GP('CMD');
260  $this->id = (int)GeneralUtility::_GP('id');
261  $this->‪menuConfig();
263  // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
264  $this->sObj = GeneralUtility::_GP('sObj');
265  // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
266  $this->edit = GeneralUtility::_GP('edit');
267  $this->perms_clause = $this->‪getBackendUser()->‪getPagePermsClause(‪Permission::PAGE_SHOW);
268  }
269 
273  protected function ‪clearCache()
274  {
275  if (GeneralUtility::_GP('clear_all_cache')) {
276  $tce = GeneralUtility::makeInstance(DataHandler::class);
277  $tce->start([], []);
278  $tce->clear_cacheCmd('all');
279  }
280  }
281 
285  protected function ‪main()
286  {
287  // Access check...
288  // The page will show only if there is a valid page and if this page may be viewed by the user
289  $this->pageinfo = ‪BackendUtility::readPageAccess($this->id, $this->perms_clause);
290  $this->access = is_array($this->pageinfo);
291  $view = $this->‪getFluidTemplateObject('tstemplate');
292  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
293  if ($this->id && $this->access) {
294  $urlParameters = [
295  'id' => ‪$this->id,
296  'template' => 'all'
297  ];
298  $aHref = (string)$uriBuilder->buildUriFromRoute('web_ts', $urlParameters);
299 
300  // JavaScript
301  $this->moduleTemplate->addJavaScriptCode(
302  'TSTemplateInlineJS',
303  'function uFormUrl(aname) {
304  document.forms[0].action = ' . GeneralUtility::quoteJSvalue($aHref . '#') . '+aname;
305  }
306  function brPoint(lnumber,t) {
307  window.location.href = '
308  . GeneralUtility::quoteJSvalue(
309  $aHref . '&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\'
310  . 'TypoScriptTemplateObjectBrowserModuleFunctionController&SET[ts_browser_type]='
311  ) . '+(t?"setup":"const")+"&breakPointLN="+lnumber;
312  return false;
313  }
314  if (top.fsMod) top.fsMod.recentIds["web"] = ' . $this->id . ';'
315  );
316  $this->moduleTemplate->getPageRenderer()->addCssInlineBlock(
317  'TSTemplateInlineStyle',
318  'TABLE#typo3-objectBrowser { width: 100%; margin-bottom: 24px; }
319  TABLE#typo3-objectBrowser A { text-decoration: none; }
320  TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
321  .ts-typoscript { width: 100%; }
322  .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
323  .tst-analyzer-options { margin:5px 0; }'
324  );
325  // Setting up the context sensitive menu:
326  $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
327  // Build the module content
328  $view->assign('actionName', $aHref);
329  $view->assign('typoscriptTemplateModuleContent', $this->‪getExtObjContent());
330  // Setting up the buttons and markers for docheader
331  $this->‪getButtons();
332  $this->‪generateMenu();
333  } else {
334  $workspaceId = $this->‪getBackendUser()->workspace;
335  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
336  ->getQueryBuilderForTable('sys_template');
337  $queryBuilder->getRestrictions()
338  ->removeAll()
339  ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
341  $queryBuilder,
342  'sys_template',
343  $workspaceId
344  );
345  $result = $queryBuilder
346  ->select(
347  'uid',
348  'pid',
349  'title',
350  'sitetitle',
351  'root',
352  'hidden',
353  'starttime',
354  'endtime',
355  't3ver_oid',
356  't3ver_wsid',
357  't3ver_state',
358  't3ver_move_id'
359  )
360  ->from('sys_template')
361  ->orderBy('sys_template.pid')
362  ->addOrderBy('sys_template.sorting')
363  ->execute();
364  $pArray = [];
365  while ($record = $result->fetch()) {
366  ‪BackendUtility::workspaceOL('sys_template', $record, $workspaceId, true);
367  if (empty($record) || ‪VersionState::cast($record['t3ver_state'])->equals(‪VersionState::DELETE_PLACEHOLDER)) {
368  continue;
369  }
370  $additionalFieldsForRootline = ['sorting', 'shortcut'];
371  $rootline = ‪BackendUtility::BEgetRootLine($record['pid'], '', true, $additionalFieldsForRootline);
372  $this->‪setInPageArray($pArray, $rootline, $record);
373  }
374 
375  $view->getRenderingContext()->setControllerAction('PageZero');
376  $view->assign('pageTree', $pArray);
377 
378  // RENDER LIST of pages with templates, END
379  // Setting up the buttons and markers for docheader
380  $this->‪getButtons();
381  }
382  $this->content = $view->render();
383  }
384 
390  protected function ‪generateMenu()
391  {
392  $menu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
393  $menu->setIdentifier('WebFuncJumpMenu');
394  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
395  foreach ($this->MOD_MENU['function'] as $controller => $title) {
396  $item = $menu
397  ->makeMenuItem()
398  ->setHref(
399  (string)$uriBuilder->buildUriFromRoute(
400  $this->moduleName,
401  [
402  'id' => $this->id,
403  'SET' => [
404  'function' => $controller
405  ]
406  ]
407  )
408  )
409  ->setTitle($title);
410  if ($controller === $this->MOD_SETTINGS['function']) {
411  $item->setActive(true);
412  }
413  $menu->addMenuItem($item);
414  }
415  $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
416  }
417 
425  public function ‪mainAction(ServerRequestInterface $request): ResponseInterface
426  {
427  // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
428  ‪$GLOBALS['SOBE'] = $this;
429 
430  $this->‪init();
431 
432  // Checking for first level external objects
433  $this->‪checkExtObj();
434 
435  $this->‪clearCache();
436  $this->‪main();
437 
438  $this->moduleTemplate->setContent($this->content);
439  return new HtmlResponse($this->moduleTemplate->renderContent());
440  }
441 
445  protected function ‪getButtons()
446  {
447  $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
448  $lang = $this->‪getLanguageService();
449 
450  if ($this->id && $this->access) {
451  // View page
452  $viewButton = $buttonBar->makeLinkButton()
453  ->setHref('#')
454  ->setOnClick(‪BackendUtility::viewOnClick(
455  $this->pageinfo['uid'],
456  '',
457  ‪BackendUtility::BEgetRootLine($this->pageinfo['uid'])
458  ))
459  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
460  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-page', ‪Icon::SIZE_SMALL));
461  $buttonBar->addButton($viewButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 99);
462 
463  if ($this->extClassConf['name'] === TypoScriptTemplateInformationModuleFunctionController::class) {
464  // NEW button
465  $urlParameters = [
466  'id' => ‪$this->id,
467  'template' => 'all',
468  'createExtension' => 'new'
469  ];
470  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
471  $newButton = $buttonBar->makeLinkButton()
472  ->setHref((string)$uriBuilder->buildUriFromRoute('web_ts', $urlParameters))
473  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:db_new.php.pagetitle'))
474  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
475  'actions-add',
477  ));
478  $buttonBar->addButton($newButton);
479  } elseif ($this->extClassConf['name'] === TypoScriptTemplateConstantEditorModuleFunctionController::class
480  && !empty($this->MOD_MENU['constant_editor_cat'])) {
481  // SAVE button
482  $saveButton = $buttonBar->makeInputButton()
483  ->setName('_savedok')
484  ->setValue('1')
485  ->setForm('TypoScriptTemplateModuleController')
486  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveDoc'))
487  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
488  'actions-document-save',
490  ))
491  ->setShowLabelText(true);
492  $buttonBar->addButton($saveButton);
493  } elseif ($this->extClassConf['name'] === TypoScriptTemplateObjectBrowserModuleFunctionController::class
494  && !empty(GeneralUtility::_GP('sObj'))
495  ) {
496  // back button in edit mode of object browser. "sObj" is set by ExtendedTemplateService
497  $urlParameters = [
498  'id' => ‪$this->id
499  ];
500  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
501  $backButton = $buttonBar->makeLinkButton()
502  ->setHref((string)$uriBuilder->buildUriFromRoute('web_ts', $urlParameters))
503  ->setClasses('typo3-goBack')
504  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.goBack'))
505  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
506  'actions-view-go-back',
508  ));
509  $buttonBar->addButton($backButton);
510  }
511  }
512  // Shortcut
513  $shortcutButton = $buttonBar->makeShortcutButton()
514  ->setModuleName('web_ts')
515  ->setGetVariables(['id', 'route']);
516  $buttonBar->addButton($shortcutButton);
517  }
518 
526  public function ‪linkWrapTemplateTitle($title, $onlyKey = '')
527  {
528  $urlParameters = [
529  'id' => ‪$this->id
530  ];
531  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
532  $aHref = (string)$uriBuilder->buildUriFromRoute('web_ts', $urlParameters);
533  if ($onlyKey) {
534  $title = '<a href="' . htmlspecialchars($aHref . '&e[' . $onlyKey . ']=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController') . '">' . htmlspecialchars($title) . '</a>';
535  } else {
536  $title = '<a href="' . htmlspecialchars($aHref . '&e[constants]=1&e[config]=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController') . '">' . htmlspecialchars($title) . '</a>';
537  }
538  return $title;
539  }
540 
547  public function ‪noTemplate($newStandardTemplate = 0)
548  {
549  $this->templateService = GeneralUtility::makeInstance(ExtendedTemplateService::class);
550 
551  $moduleContent['state'] = ‪InfoboxViewHelper::STATE_INFO;
552 
553  // New standard?
554  if ($newStandardTemplate) {
555  $selector = '';
556  $staticsText = '';
557  // Hook to change output, implemented for statictemplates
558  $hookObject = $this->‪getHookObjectForAction('newStandardTemplateView');
559  if (!empty($hookObject)) {
560  $reference = [
561  'selectorHtml' => &$selector,
562  'staticsText' => &$staticsText
563  ];
564  GeneralUtility::callUserFunction(
565  $hookObject,
566  $reference,
567  $this
568  );
569  $selector = $reference['selectorHtml'];
570  $staticsText = $reference['staticsText'];
571  }
572  // Extension?
573  $moduleContent['staticsText'] = $staticsText;
574  $moduleContent['selector'] = $selector;
575  }
576  // Go to previous Page with Template...
577  $previousPage = $this->templateService->ext_prevPageWithTemplate($this->id, $this->perms_clause);
578  if ($previousPage) {
579  $urlParameters = [
580  'id' => $previousPage['uid']
581  ];
582  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
583  $previousPage['aHref'] = (string)$uriBuilder->buildUriFromRoute('web_ts', $urlParameters);
584  $moduleContent['previousPage'] = $previousPage;
585  }
586  $view = $this->‪getFluidTemplateObject('tstemplate', 'NoTemplate');
587  $view->assign('content', $moduleContent);
588  return $view->render();
589  }
590 
596  public function ‪templateMenu()
597  {
598  $this->templateService = GeneralUtility::makeInstance(ExtendedTemplateService::class);
599 
600  $all = $this->templateService->ext_getAllTemplates($this->id);
601  if (count($all) > 1) {
602  $this->MOD_MENU['templatesOnPage'] = [];
603  foreach ($all as $d) {
604  $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
605  }
606  }
607  $this->MOD_SETTINGS = ‪BackendUtility::getModuleData(
608  $this->MOD_MENU,
609  GeneralUtility::_GP('SET'),
610  'web_ts',
611  $this->modMenu_type,
612  $this->modMenu_dontValidateList,
613  $this->modMenu_setDefaultList
614  );
616  $this->id,
617  'SET[templatesOnPage]',
618  $this->MOD_SETTINGS['templatesOnPage'],
619  $this->MOD_MENU['templatesOnPage']
620  );
621  }
622 
630  public function ‪createTemplate(‪$id, $actTemplateId = 0)
631  {
632  $recData = [];
633  $tce = GeneralUtility::makeInstance(DataHandler::class);
634 
635  if (GeneralUtility::_GP('createExtension')) {
636  $recData['sys_template']['NEW'] = [
637  'pid' => $actTemplateId ? -1 * $actTemplateId : ‪$id,
638  'title' => '+ext'
639  ];
640  $tce->start($recData, []);
641  $tce->process_datamap();
642  } elseif (GeneralUtility::_GP('newWebsite')) {
643  // Hook to handle row data, implemented for statictemplates
644  $hookObject = $this->‪getHookObjectForAction('newStandardTemplateHandler');
645  if (!empty($hookObject)) {
646  $reference = [
647  'recData' => &$recData,
648  'id' => ‪$id,
649  ];
650  GeneralUtility::callUserFunction(
651  $hookObject,
652  $reference,
653  $this
654  );
655  $recData = $reference['recData'];
656  } else {
657  $recData['sys_template']['NEW'] = [
658  'pid' => ‪$id,
659  'title' => $this->‪getLanguageService()->‪getLL('titleNewSite'),
660  'sorting' => 0,
661  'root' => 1,
662  'clear' => 3,
663  'config' => '
664 # Default PAGE object:
665 page = PAGE
666 page.10 = TEXT
667 page.10.value = HELLO WORLD!
668 '
669  ];
670  }
671  $tce->start($recData, []);
672  $tce->process_datamap();
673  $tce->clear_cacheCmd('all');
674  }
675  return $tce->substNEWwithIDs['NEW'];
676  }
677 
686  protected function ‪setInPageArray(&$pArray, $rlArr, $row)
687  {
688  ksort($rlArr);
689  reset($rlArr);
690  if (!$rlArr[0]['uid']) {
691  array_shift($rlArr);
692  }
693  $cEl = current($rlArr);
694  if (empty($pArray[$cEl['uid']])) {
695  $pArray[$cEl['uid']] = $cEl;
696  }
697  array_shift($rlArr);
698  if (!empty($rlArr)) {
699  if (empty($pArray[$cEl['uid']]['_nodes'])) {
700  $pArray[$cEl['uid']]['_nodes'] = [];
701  }
702  $this->‪setInPageArray($pArray[$cEl['uid']]['_nodes'], $rlArr, $row);
703  } else {
704  $pArray[$cEl['uid']]['_templates'][] = $row;
705  }
706  uasort($pArray, function ($a, $b) {
707  return $a['sorting'] - $b['sorting'];
708  });
709  }
710 
720  public function ‪renderList($pArray, $lines = [], $c = 0)
721  {
722  trigger_error(
723  'The method `TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::renderList` has been deprecated and should not be used any longer, this method will be removed in TYPO3 v10.0',
724  E_USER_DEPRECATED
725  );
726 
727  if (!is_array($pArray)) {
728  return $lines;
729  }
730 
731  $statusCheckedIcon = $this->moduleTemplate->getIconFactory()
732  ->getIcon('status-status-checked', ‪Icon::SIZE_SMALL)->render();
733  foreach ($pArray as $k => $v) {
735  $line = [];
736  $key = $k . '_';
737  $line['marginLeft'] = $c * 20;
738  $line['pageTitle'] = GeneralUtility::fixed_lgd_cs($pArray[$k], 30);
739  $line['icon'] = $this->moduleTemplate->getIconFactory()
740  ->getIconForRecord(
741  'pages',
744  )->render();
745  if (!empty($pArray[$key])) {
746  $line['href'] = GeneralUtility::linkThisScript(['id' => (int)$k]);
747  $line['title'] = 'ID: ' . (int)$k;
748  $line['count'] = $pArray[$k . '_']['count'];
749  $line['root_max_val'] = ($pArray[$key]['root_max_val'] > 0 ? $statusCheckedIcon : '&nbsp;');
750  $line['root_min_val'] = ($pArray[$key]['root_min_val'] === 0 ? $statusCheckedIcon : '&nbsp;');
751  } else {
752  $line['href'] = '';
753  $line['title'] = '';
754  $line['count'] = '';
755  $line['root_max_val'] = '';
756  $line['root_min_val'] = '';
757  }
758  $lines[] = $line;
759  $lines = $this->‪renderList($pArray[$k . '.'], $lines, $c + 1);
760  }
761  }
762  return $lines;
763  }
764 
772  protected function ‪getFluidTemplateObject($extensionName, $templateName = 'Main')
773  {
774  $view = GeneralUtility::makeInstance(StandaloneView::class);
775  $view->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName($extensionName);
776  $view->getRenderingContext()->setControllerAction($templateName);
777  $view->getRequest()->setControllerExtensionName('tstemplate');
778  return $view;
779  }
780 
786  protected function ‪applyWorkspaceConstraint(
787  QueryBuilder $queryBuilder,
788  string $tableName,
789  int $workspaceId
790  ) {
791  if (empty(‪$GLOBALS['TCA'][$tableName]['ctrl']['versioningWS'])) {
792  return;
793  }
794 
795  $workspaceIds = [0];
796  if ($workspaceId > 0) {
797  $workspaceIds[] = $workspaceId;
798  }
799  $queryBuilder->andWhere(
800  $queryBuilder->expr()->in(
801  't3ver_wsid',
802  $queryBuilder->createNamedParameter($workspaceIds, Connection::PARAM_INT_ARRAY)
803  ),
804  $queryBuilder->expr()->neq(
805  'pid',
806  $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)
807  )
808  );
809  }
810 
815  protected function ‪getHookObjectForAction($action)
816  {
817  if (!empty(‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class][$action])) {
818  return ‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class][$action];
819  }
820  return null;
821  }
822 
830  protected function ‪menuConfig()
831  {
832  // Page / user TSconfig settings and blinding of menu-items
833  $this->modTSconfig['properties'] = ‪BackendUtility::getPagesTSconfig($this->id)['mod.']['web_ts.'] ?? [];
834  $this->MOD_MENU['function'] = $this->‪mergeExternalItems('web_ts', 'function', $this->MOD_MENU['function']);
835  $blindActions = $this->modTSconfig['properties']['menu.']['function.'] ?? [];
836  foreach ($blindActions as $key => $value) {
837  if (!$value && array_key_exists($key, $this->MOD_MENU['function'])) {
838  unset($this->MOD_MENU['function'][$key]);
839  }
840  }
841  $this->MOD_SETTINGS = ‪BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), 'web_ts', $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
842  }
843 
854  protected function ‪mergeExternalItems($modName, $menuKey, $menuArr)
855  {
856  $mergeArray = ‪$GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey];
857  if (is_array($mergeArray)) {
858  foreach ($mergeArray as $k => $v) {
859  if (((string)$v['ws'] === '' || $this->‪getBackendUser()->workspace === 0 && GeneralUtility::inList($v['ws'], 'online')) || $this->‪getBackendUser()->workspace === -1 && GeneralUtility::inList($v['ws'], 'offline') || $this->‪getBackendUser()->workspace > 0 && GeneralUtility::inList($v['ws'], 'custom')) {
860  $menuArr[$k] = $this->‪getLanguageService()->‪sL($v['title']);
861  }
862  }
863  }
864  return $menuArr;
865  }
866 
874  protected function ‪handleExternalFunctionValue($MM_key = 'function', $MS_value = null)
875  {
876  if ($MS_value === null) {
877  $MS_value = $this->MOD_SETTINGS[$MM_key];
878  }
879  $this->extClassConf = $this->‪getExternalItemConfig('web_ts', $MM_key, $MS_value);
880  }
881 
892  protected function ‪getExternalItemConfig($modName, $menuKey, $value = '')
893  {
894  if (isset(‪$GLOBALS['TBE_MODULES_EXT'][$modName])) {
895  return (string)$value !== ''
896  ? ‪$GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey][$value]
897  : ‪$GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey];
898  }
899  return null;
900  }
901 
910  protected function ‪checkExtObj()
911  {
912  if (is_array($this->extClassConf) && $this->extClassConf['name']) {
913  $this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
914  $this->extObj->init($this);
915  // Re-write:
916  $this->MOD_SETTINGS = ‪BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), 'web_ts', $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
917  }
918  }
919 
925  protected function ‪checkSubExtObj()
926  {
927  if (is_object($this->extObj) && is_callable([$this->extObj, 'checkExtObj'])) {
928  $this->extObj->checkExtObj();
929  }
930  }
931 
939  protected function ‪extObjHeader()
940  {
941  if (is_callable([$this->extObj, 'head'])) {
942  $this->extObj->head();
943  }
944  }
945 
949  protected function ‪extObjContent()
950  {
951  if ($this->extObj === null) {
952  $flashMessage = GeneralUtility::makeInstance(
953  FlashMessage::class,
954  $this->‪getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:no_modules_registered'),
955  $this->‪getLanguageService()->getLL('title'),
957  );
958  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
960  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
961  $defaultFlashMessageQueue->enqueue($flashMessage);
962  } else {
963  if (is_callable([$this->extObj, 'main'])) {
964  $this->content .= $this->extObj->main();
965  }
966  }
967  }
968 
974  protected function ‪getExtObjContent()
975  {
976  $savedContent = ‪$this->content;
977  $this->content = '';
978  $this->‪extObjContent();
979  $newContent = ‪$this->content;
980  $this->content = $savedContent;
981  return $newContent;
982  }
983 
988  protected function ‪getLanguageService(): ‪LanguageService
989  {
990  return ‪$GLOBALS['LANG'];
991  }
992 
997  protected function ‪getBackendUser(): BackendUserAuthentication
998  {
999  return ‪$GLOBALS['BE_USER'];
1000  }
1001 
1005  protected function ‪getPageRenderer(): PageRenderer
1006  {
1007  return GeneralUtility::makeInstance(PageRenderer::class);
1008  }
1009 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:81
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getExtObjContent
‪string getExtObjContent()
Definition: TypoScriptTemplateModuleController.php:950
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getHookObjectForAction
‪string getHookObjectForAction($action)
Definition: TypoScriptTemplateModuleController.php:791
‪TYPO3\CMS\Core\Localization\LanguageService\includeLLFile
‪mixed includeLLFile($fileRef, $setGlobal=true, $mergeLocalOntoDefault=false)
Definition: LanguageService.php:260
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getPageRenderer
‪PageRenderer getPageRenderer()
Definition: TypoScriptTemplateModuleController.php:981
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\applyWorkspaceConstraint
‪applyWorkspaceConstraint(QueryBuilder $queryBuilder, string $tableName, int $workspaceId)
Definition: TypoScriptTemplateModuleController.php:762
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$MOD_MENU
‪array $MOD_MENU
Definition: TypoScriptTemplateModuleController.php:169
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$MOD_SETTINGS
‪array $MOD_SETTINGS
Definition: TypoScriptTemplateModuleController.php:178
‪TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_LEFT
‪const BUTTON_POSITION_LEFT
Definition: ButtonBar.php:35
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger($var)
Definition: MathUtility.php:73
‪TYPO3\CMS\Backend\Template\Components\ButtonBar
Definition: ButtonBar.php:31
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\extObjContent
‪extObjContent()
Definition: TypoScriptTemplateModuleController.php:925
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getFluidTemplateObject
‪StandaloneView getFluidTemplateObject($extensionName, $templateName='Main')
Definition: TypoScriptTemplateModuleController.php:748
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\noTemplate
‪string noTemplate($newStandardTemplate=0)
Definition: TypoScriptTemplateModuleController.php:523
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getPagePermsClause
‪string getPagePermsClause($perms)
Definition: BackendUserAuthentication.php:523
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$perms_clause
‪string $perms_clause
Definition: TypoScriptTemplateModuleController.php:91
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$MCONF
‪array $MCONF
Definition: TypoScriptTemplateModuleController.php:150
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\extObjHeader
‪extObjHeader()
Definition: TypoScriptTemplateModuleController.php:915
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$textExtensions
‪string $textExtensions
Definition: TypoScriptTemplateModuleController.php:106
‪TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper\STATE_INFO
‪const STATE_INFO
Definition: InfoboxViewHelper.php:61
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getExternalItemConfig
‪mixed getExternalItemConfig($modName, $menuKey, $value='')
Definition: TypoScriptTemplateModuleController.php:868
‪TYPO3\CMS\Core\Database\Query\QueryBuilder\createNamedParameter
‪string createNamedParameter($value, int $type=\PDO::PARAM_STR, string $placeHolder=null)
Definition: QueryBuilder.php:894
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\neq
‪string neq(string $fieldName, $value)
Definition: ExpressionBuilder.php:126
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\__construct
‪__construct()
Definition: TypoScriptTemplateModuleController.php:209
‪TYPO3\CMS\Tstemplate\Controller
Definition: TemplateAnalyzerModuleFunctionController.php:2
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$edit
‪string $edit
Definition: TypoScriptTemplateModuleController.php:101
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\linkWrapTemplateTitle
‪string linkWrapTemplateTitle($title, $onlyKey='')
Definition: TypoScriptTemplateModuleController.php:502
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction
‪ResponseInterface mainAction(ServerRequestInterface $request)
Definition: TypoScriptTemplateModuleController.php:401
‪TYPO3\CMS\Core\TypoScript\ExtendedTemplateService
Definition: ExtendedTemplateService.php:39
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$access
‪bool $access
Definition: TypoScriptTemplateModuleController.php:127
‪TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER
‪const DELETE_PLACEHOLDER
Definition: VersionState.php:54
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:158
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\clearCache
‪clearCache()
Definition: TypoScriptTemplateModuleController.php:249
‪TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine
‪static array BEgetRootLine($uid, $clause='', $workspaceOL=false, array $additionalFields=[])
Definition: BackendUtility.php:374
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$pageinfo
‪array $pageinfo
Definition: TypoScriptTemplateModuleController.php:123
‪TYPO3\CMS\Backend\Utility\BackendUtility\getFuncMenu
‪static string getFuncMenu( $mainParams, $elementName, $currentValue, $menuItems, $script='', $addParams='')
Definition: BackendUtility.php:2955
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:40
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:23
‪TYPO3\CMS\Core\Database\Query\QueryBuilder
Definition: QueryBuilder.php:47
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\setInPageArray
‪setInPageArray(&$pArray, $rlArr, $row)
Definition: TypoScriptTemplateModuleController.php:662
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$extObj
‪object $extObj
Definition: TypoScriptTemplateModuleController.php:204
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$id
‪$id
Definition: TypoScriptTemplateModuleController.php:155
‪TYPO3\CMS\Core\Type\Enumeration\cast
‪static static cast($value)
Definition: Enumeration.php:182
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:35
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\checkExtObj
‪checkExtObj()
Definition: TypoScriptTemplateModuleController.php:886
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\handleExternalFunctionValue
‪handleExternalFunctionValue($MM_key='function', $MS_value=null)
Definition: TypoScriptTemplateModuleController.php:850
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\in
‪string in(string $fieldName, $value)
Definition: ExpressionBuilder.php:242
‪TYPO3\CMS\Core\Database\Query\QueryBuilder\andWhere
‪QueryBuilder andWhere(... $where)
Definition: QueryBuilder.php:647
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$content
‪string $content
Definition: TypoScriptTemplateModuleController.php:197
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\renderList
‪array renderList($pArray, $lines=[], $c=0)
Definition: TypoScriptTemplateModuleController.php:696
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$templateService
‪ExtendedTemplateService $templateService
Definition: TypoScriptTemplateModuleController.php:143
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: TypoScriptTemplateModuleController.php:973
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:35
‪TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData
‪static array getModuleData( $MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
Definition: BackendUtility.php:3259
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController
Definition: TypoScriptTemplateModuleController.php:50
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$extClassConf
‪array $extClassConf
Definition: TypoScriptTemplateModuleController.php:191
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:45
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:32
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$modMenu_type
‪string $modMenu_type
Definition: TypoScriptTemplateModuleController.php:111
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$moduleTemplate
‪ModuleTemplate $moduleTemplate
Definition: TypoScriptTemplateModuleController.php:139
‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
Definition: PublicMethodDeprecationTrait.php:68
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$sObj
‪string $sObj
Definition: TypoScriptTemplateModuleController.php:96
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL
‪static array getRecordWSOL( $table, $uid, $fields=' *', $where='', $useDeleteClause=true, $unsetMovePointers=false)
Definition: BackendUtility.php:174
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\init
‪init()
Definition: TypoScriptTemplateModuleController.php:232
‪TYPO3\CMS\Core\Versioning\VersionState
Definition: VersionState.php:23
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\createTemplate
‪string createTemplate($id, $actTemplateId=0)
Definition: TypoScriptTemplateModuleController.php:606
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$deprecatedPublicMethods
‪array $deprecatedPublicMethods
Definition: TypoScriptTemplateModuleController.php:73
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:31
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$modMenu_setDefaultList
‪string $modMenu_setDefaultList
Definition: TypoScriptTemplateModuleController.php:119
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getLanguageService
‪LanguageService getLanguageService()
Definition: TypoScriptTemplateModuleController.php:964
‪TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick
‪static string viewOnClick( $pageUid, $backPath='', $rootLine=null, $anchorSection='', $alternativeUrl='', $additionalGetVars='', $switchFocus=true)
Definition: BackendUtility.php:2616
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mergeExternalItems
‪array mergeExternalItems($modName, $menuKey, $menuArr)
Definition: TypoScriptTemplateModuleController.php:830
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:32
‪TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig
‪static array getPagesTSconfig($id, $rootLine=null, $returnPartArray=false)
Definition: BackendUtility.php:864
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$modMenu_dontValidateList
‪string $modMenu_dontValidateList
Definition: TypoScriptTemplateModuleController.php:115
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$modTSconfig
‪array $modTSconfig
Definition: TypoScriptTemplateModuleController.php:184
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL
‪static workspaceOL($table, &$row, $wsid=-99, $unsetMovePointers=false)
Definition: BackendUtility.php:4048
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:26
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$CMD
‪mixed $CMD
Definition: TypoScriptTemplateModuleController.php:162
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\generateMenu
‪generateMenu()
Definition: TypoScriptTemplateModuleController.php:366
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$moduleName
‪string $moduleName
Definition: TypoScriptTemplateModuleController.php:133
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:21
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getButtons
‪getButtons()
Definition: TypoScriptTemplateModuleController.php:421
‪TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper
Definition: InfoboxViewHelper.php:58
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:29
‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
Definition: PublicPropertyDeprecationTrait.php:66
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\main
‪main()
Definition: TypoScriptTemplateModuleController.php:261
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$deprecatedPublicProperties
‪array $deprecatedPublicProperties
Definition: TypoScriptTemplateModuleController.php:54
‪TYPO3\CMS\Core\Localization\LanguageService\getLL
‪string getLL($index)
Definition: LanguageService.php:118
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\checkSubExtObj
‪checkSubExtObj()
Definition: TypoScriptTemplateModuleController.php:901
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:25
‪TYPO3\CMS\Core\Database\Query\QueryBuilder\expr
‪ExpressionBuilder expr()
Definition: QueryBuilder.php:125
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\menuConfig
‪menuConfig()
Definition: TypoScriptTemplateModuleController.php:806
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Core\Http\HtmlResponse
Definition: HtmlResponse.php:25
‪TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess
‪static array bool readPageAccess($id, $perms_clause)
Definition: BackendUtility.php:635
‪TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\templateMenu
‪string templateMenu()
Definition: TypoScriptTemplateModuleController.php:572