[TASK] Remove inexistent method parameter
[Packages/TYPO3.CMS.git] / typo3 / sysext / tstemplate / Classes / Controller / TypoScriptTemplateModuleController.php
1 <?php
2 namespace TYPO3\CMS\Tstemplate\Controller;
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;
19 use TYPO3\CMS\Backend\Module\BaseScriptClass;
20 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
21 use TYPO3\CMS\Backend\Template\ModuleTemplate;
22 use TYPO3\CMS\Backend\Utility\BackendUtility;
23 use TYPO3\CMS\Core\Database\ConnectionPool;
24 use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
25 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
26 use TYPO3\CMS\Core\DataHandling\DataHandler;
27 use TYPO3\CMS\Core\Imaging\Icon;
28 use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
29 use TYPO3\CMS\Core\Utility\GeneralUtility;
30 use TYPO3\CMS\Core\Utility\MathUtility;
31 use TYPO3\CMS\Fluid\View\StandaloneView;
32 use TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper;
33
34 /**
35 * Module: TypoScript Tools
36 */
37 class TypoScriptTemplateModuleController extends BaseScriptClass
38 {
39 /**
40 * @var string
41 */
42 public $perms_clause;
43
44 /**
45 * @var string
46 */
47 public $e;
48
49 /**
50 * @var string
51 */
52 public $sObj;
53
54 /**
55 * @var string
56 */
57 public $edit;
58
59 /**
60 * @var string
61 */
62 public $textExtensions = 'html,htm,txt,css,tmpl,inc,js';
63
64 /**
65 * @var string
66 */
67 public $modMenu_type = '';
68
69 /**
70 * @var string
71 */
72 public $modMenu_dontValidateList = '';
73
74 /**
75 * @var string
76 */
77 public $modMenu_setDefaultList = '';
78
79 /**
80 * @var array
81 */
82 public $pageinfo = array();
83
84 /**
85 * @var bool
86 */
87 public $access = false;
88
89 /**
90 * The name of the module
91 *
92 * @var string
93 */
94 protected $moduleName = 'web_ts';
95
96 /**
97 * ModuleTemplate Container
98 *
99 * @var ModuleTemplate
100 */
101 protected $moduleTemplate;
102
103 /**
104 * Constructor
105 */
106 public function __construct()
107 {
108 $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
109 $this->getLanguageService()->includeLLFile('EXT:tstemplate/Resources/Private/Language/locallang.xlf');
110
111 $this->MCONF = array(
112 'name' => $this->moduleName
113 );
114 $this->moduleTemplate->addJavaScriptCode(
115 'jumpToUrl',
116 '
117 function jumpToUrl(URL) {
118 window.location.href = URL;
119 return false;
120 }
121 '
122 );
123 }
124
125 /**
126 * Init
127 *
128 * @return void
129 */
130 public function init()
131 {
132 parent::init();
133 $this->id = (int)GeneralUtility::_GP('id');
134 $this->e = GeneralUtility::_GP('e');
135 $this->sObj = GeneralUtility::_GP('sObj');
136 $this->edit = GeneralUtility::_GP('edit');
137 $this->perms_clause = $this->getBackendUser()->getPagePermsClause(1);
138 }
139
140 /**
141 * Clear cache
142 *
143 * @return void
144 */
145 public function clearCache()
146 {
147 if (GeneralUtility::_GP('clear_all_cache')) {
148 /** @var DataHandler $tce */
149 $tce = GeneralUtility::makeInstance(DataHandler::class);
150 $tce->start(array(), array());
151 $tce->clear_cacheCmd('all');
152 }
153 }
154
155 /**
156 * Main
157 *
158 * @return void
159 */
160 public function main()
161 {
162 // Access check...
163 // The page will show only if there is a valid page and if this page may be viewed by the user
164 $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
165 $this->access = is_array($this->pageinfo);
166 $view = $this->getFluidTemplateObject('tstemplate');
167
168 if ($this->id && $this->access) {
169 $urlParameters = array(
170 'id' => $this->id,
171 'template' => 'all'
172 );
173 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
174
175 // JavaScript
176 $this->moduleTemplate->addJavaScriptCode(
177 'TSTemplateInlineJS',
178 'function uFormUrl(aname) {
179 document.forms[0].action = ' . GeneralUtility::quoteJSvalue($aHref . '#') . '+aname;
180 }
181 function brPoint(lnumber,t) {
182 window.location.href = '
183 . GeneralUtility::quoteJSvalue(
184 $aHref . '&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\'
185 . 'TypoScriptTemplateObjectBrowserModuleFunctionController&SET[ts_browser_type]='
186 ) . '+(t?"setup":"const")+"&breakPointLN="+lnumber;
187 return false;
188 }
189 if (top.fsMod) top.fsMod.recentIds["web"] = ' . $this->id . ';'
190 );
191 $this->moduleTemplate->getPageRenderer()->addCssInlineBlock(
192 'TSTemplateInlineStyle',
193 'TABLE#typo3-objectBrowser { width: 100%; margin-bottom: 24px; }
194 TABLE#typo3-objectBrowser A { text-decoration: none; }
195 TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
196 .ts-typoscript { width: 100%; }
197 .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
198 .tst-analyzer-options { margin:5px 0; }'
199 );
200 // Setting up the context sensitive menu:
201 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
202 // Build the module content
203 $view->assign('actionName', $aHref);
204 $view->assign('typoscriptTemplateModuleContent', $this->getExtObjContent());
205 // Setting up the buttons and markers for docheader
206 $this->getButtons();
207 $this->generateMenu();
208 } else {
209 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
210 $queryBuilder->getRestrictions()
211 ->removeAll()
212 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
213 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
214
215 $result = $queryBuilder->select('pages.uid')
216 ->addSelectLiteral(
217 $queryBuilder->expr()->count('*', 'count'),
218 $queryBuilder->expr()->max('sys_template.root', 'root_max_val'),
219 $queryBuilder->expr()->min('sys_template.root', 'root_min_val')
220 )
221 ->from('pages')
222 ->from('sys_template')
223 ->where($queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('sys_template.pid')))
224 ->groupBy('pages.uid')
225 ->orderBy('pages.pid')
226 ->addOrderBy('pages.sorting')
227 ->execute();
228
229 $pArray = array();
230 while ($record = $result->fetch()) {
231 $this->setInPageArray($pArray, BackendUtility::BEgetRootLine($record['uid'], 'AND 1=1'), $record);
232 }
233
234 $view->getRenderingContext()->setControllerAction('PageZero');
235 $view->assign('templateList', $this->renderList($pArray));
236
237 // RENDER LIST of pages with templates, END
238 // Setting up the buttons and markers for docheader
239 $this->getButtons();
240 }
241 $this->content = $view->render();
242 }
243
244 /**
245 * Generates the menu based on $this->MOD_MENU
246 *
247 * @return void
248 * @throws \InvalidArgumentException
249 */
250 protected function generateMenu()
251 {
252 $menu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
253 $menu->setIdentifier('WebFuncJumpMenu');
254 foreach ($this->MOD_MENU['function'] as $controller => $title) {
255 $item = $menu
256 ->makeMenuItem()
257 ->setHref(
258 BackendUtility::getModuleUrl(
259 $this->moduleName,
260 [
261 'id' => $this->id,
262 'SET' => [
263 'function' => $controller
264 ]
265 ]
266 )
267 )
268 ->setTitle($title);
269 if ($controller === $this->MOD_SETTINGS['function']) {
270 $item->setActive(true);
271 }
272 $menu->addMenuItem($item);
273 }
274 $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
275 }
276
277 /**
278 * Injects the request object for the current request or subrequest
279 * Then checks for module functions that have hooked in, and renders menu etc.
280 *
281 * @param ServerRequestInterface $request the current request
282 * @param ResponseInterface $response
283 * @return ResponseInterface the response with the content
284 */
285 public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
286 {
287 $GLOBALS['SOBE'] = $this;
288 $this->init();
289
290 // Checking for first level external objects
291 $this->checkExtObj();
292
293 $this->clearCache();
294 $this->main();
295
296 $this->moduleTemplate->setContent($this->content);
297 $response->getBody()->write($this->moduleTemplate->renderContent());
298 return $response;
299 }
300
301 /**
302 * Create the panel of buttons for submitting the form or otherwise perform operations.
303 *
304 * @return array All available buttons as an assoc. array
305 */
306 protected function getButtons()
307 {
308 $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
309 $lang = $this->getLanguageService();
310
311 if ($this->id && $this->access) {
312 // View page
313 $viewButton = $buttonBar->makeLinkButton()
314 ->setHref('#')
315 ->setOnClick(BackendUtility::viewOnClick(
316 $this->pageinfo['uid'],
317 '',
318 BackendUtility::BEgetRootLine($this->pageinfo['uid'])
319 ))
320 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage'))
321 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL));
322 $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 99);
323 if ($this->extClassConf['name'] === TypoScriptTemplateInformationModuleFunctionController::class) {
324 // NEW button
325 $urlParameters = array(
326 'id' => $this->id,
327 'template' => 'all',
328 'createExtension' => 'new'
329 );
330
331 if (!empty($this->e) && !GeneralUtility::_POST('_saveandclosedok')) {
332 $saveButton = $buttonBar->makeInputButton()
333 ->setName('_savedok')
334 ->setValue('1')
335 ->setForm('TypoScriptTemplateModuleController')
336 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
337 'actions-document-save',
338 Icon::SIZE_SMALL
339 ))
340 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc'));
341
342 $saveAndCloseButton = $buttonBar->makeInputButton()
343 ->setName('_saveandclosedok')
344 ->setValue('1')
345 ->setForm('TypoScriptTemplateModuleController')
346 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc'))
347 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
348 'actions-document-save-close',
349 Icon::SIZE_SMALL
350 ));
351
352 $splitButtonElement = $buttonBar->makeSplitButton()
353 ->addItem($saveButton)
354 ->addItem($saveAndCloseButton);
355
356 $buttonBar->addButton($splitButtonElement, ButtonBar::BUTTON_POSITION_LEFT, 3);
357
358 // CLOSE button
359 $closeButton = $buttonBar->makeLinkButton()
360 ->setHref(BackendUtility::getModuleUrl('web_ts', array('id' => $this->id)))
361 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc'))
362 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
363 'actions-document-close',
364 Icon::SIZE_SMALL
365 ));
366 $buttonBar->addButton($closeButton);
367 } else {
368 $newButton = $buttonBar->makeLinkButton()
369 ->setHref(BackendUtility::getModuleUrl('web_ts', $urlParameters))
370 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle'))
371 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
372 'actions-document-new',
373 Icon::SIZE_SMALL
374 ));
375 $buttonBar->addButton($newButton);
376 }
377 } elseif ($this->extClassConf['name'] === TypoScriptTemplateConstantEditorModuleFunctionController::class
378 && !empty($this->MOD_MENU['constant_editor_cat'])) {
379 // SAVE button
380 $saveButton = $buttonBar->makeInputButton()
381 ->setName('_savedok')
382 ->setValue('1')
383 ->setForm('TypoScriptTemplateModuleController')
384 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc'))
385 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
386 'actions-document-save',
387 Icon::SIZE_SMALL
388 ))
389 ->setShowLabelText(true);
390 $buttonBar->addButton($saveButton);
391 } elseif ($this->extClassConf['name'] === TypoScriptTemplateObjectBrowserModuleFunctionController::class) {
392 if (!empty($this->sObj)) {
393 // BACK
394 $urlParameters = array(
395 'id' => $this->id
396 );
397 $backButton = $buttonBar->makeLinkButton()
398 ->setHref(BackendUtility::getModuleUrl('web_ts', $urlParameters))
399 ->setClasses('typo3-goBack')
400 ->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack'))
401 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
402 'actions-view-go-back',
403 Icon::SIZE_SMALL
404 ));
405 $buttonBar->addButton($backButton);
406 }
407 }
408 }
409 // Shortcut
410 $shortcutButton = $buttonBar->makeShortcutButton()
411 ->setModuleName($this->MCONF['name'])
412 ->setGetVariables(['id', 'M']);
413 $buttonBar->addButton($shortcutButton);
414 }
415
416 // OTHER FUNCTIONS:
417 /**
418 * Wrap title for link in template
419 *
420 * @param string $title
421 * @param string $onlyKey
422 * @return string
423 */
424 public function linkWrapTemplateTitle($title, $onlyKey = '')
425 {
426 $urlParameters = array(
427 'id' => $this->id
428 );
429 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
430 if ($onlyKey) {
431 $title = '<a href="' . htmlspecialchars(($aHref . '&e[' . $onlyKey . ']=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
432 } else {
433 $title = '<a href="' . htmlspecialchars(($aHref . '&e[constants]=1&e[config]=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
434 }
435 return $title;
436 }
437
438 /**
439 * No template
440 *
441 * @param int $newStandardTemplate
442 * @return string
443 */
444 public function noTemplate($newStandardTemplate = 0)
445 {
446 // Defined global here!
447 /** @var ExtendedTemplateService $tmpl */
448 $tmpl = GeneralUtility::makeInstance(ExtendedTemplateService::class);
449 $GLOBALS['tmpl'] = $tmpl;
450 $tmpl->init();
451
452 $moduleContent['state'] = InfoboxViewHelper::STATE_INFO;
453
454 // New standard?
455 if ($newStandardTemplate) {
456 $selector = '';
457 $staticsText = '';
458 // Hook to change output, implemented for statictemplates
459 $hookObject = $this->getHookObjectForAction('newStandardTemplateView');
460 if (!empty($hookObject)) {
461 $reference = array(
462 'selectorHtml' => &$selector,
463 'staticsText' => &$staticsText
464 );
465 GeneralUtility::callUserFunction(
466 $hookObject,
467 $reference,
468 $this
469 );
470 $selector = $reference['selectorHtml'];
471 $staticsText = $reference['staticsText'];
472 }
473 // Extension?
474 $moduleContent['staticsText'] = $staticsText;
475 $moduleContent['selector'] = $selector;
476 }
477 // Go to previous Page with Template...
478 $previousPage = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
479 if ($previousPage) {
480 $urlParameters = [
481 'id' => $previousPage['uid']
482 ];
483 $previousPage['aHref'] = BackendUtility::getModuleUrl('web_ts', $urlParameters);
484 $moduleContent['previousPage'] = $previousPage;
485 }
486 $view = $this->getFluidTemplateObject('tstemplate', 'NoTemplate');
487 $view->assign('partialName', 'NoTemplate');
488 $view->assign('content', $moduleContent);
489 return $view->render();
490 }
491
492 /**
493 * Render template menu
494 *
495 * @return string
496 */
497 public function templateMenu()
498 {
499 /** @var ExtendedTemplateService $tmpl */
500 $tmpl = GeneralUtility::makeInstance(ExtendedTemplateService::class);
501 $GLOBALS['tmpl'] = $tmpl;
502 $tmpl->init();
503
504 $all = $tmpl->ext_getAllTemplates($this->id);
505 if (count($all) > 1) {
506 $this->MOD_MENU['templatesOnPage'] = array();
507 foreach ($all as $d) {
508 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
509 }
510 }
511 $this->MOD_SETTINGS = BackendUtility::getModuleData(
512 $this->MOD_MENU,
513 GeneralUtility::_GP('SET'),
514 $this->MCONF['name'],
515 $this->modMenu_type,
516 $this->modMenu_dontValidateList,
517 $this->modMenu_setDefaultList
518 );
519 return BackendUtility::getFuncMenu(
520 $this->id,
521 'SET[templatesOnPage]',
522 $this->MOD_SETTINGS['templatesOnPage'],
523 $this->MOD_MENU['templatesOnPage']
524 );
525 }
526
527 /**
528 * Create template
529 *
530 * @param int $id
531 * @param int $actTemplateId
532 * @return string
533 */
534 public function createTemplate($id, $actTemplateId = 0)
535 {
536 $recData = array();
537 /** @var DataHandler $tce */
538 $tce = GeneralUtility::makeInstance(DataHandler::class);
539
540 if (GeneralUtility::_GP('createExtension')) {
541 $recData['sys_template']['NEW'] = array(
542 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
543 'title' => '+ext'
544 );
545 $tce->start($recData, array());
546 $tce->process_datamap();
547 } elseif (GeneralUtility::_GP('newWebsite')) {
548 // Hook to handle row data, implemented for statictemplates
549 $hookObject = $this->getHookObjectForAction('newStandardTemplateHandler');
550 if (!empty($hookObject)) {
551 $reference = array(
552 'recData' => &$recData,
553 'id' => $id,
554 );
555 GeneralUtility::callUserFunction(
556 $hookObject,
557 $reference,
558 $this
559 );
560 $recData = $reference['recData'];
561 } else {
562 $recData['sys_template']['NEW'] = array(
563 'pid' => $id,
564 'title' => $this->getLanguageService()->getLL('titleNewSite'),
565 'sorting' => 0,
566 'root' => 1,
567 'clear' => 3,
568 'config' => '
569 # Default PAGE object:
570 page = PAGE
571 page.10 = TEXT
572 page.10.value = HELLO WORLD!
573 '
574 );
575 }
576 $tce->start($recData, array());
577 $tce->process_datamap();
578 $tce->clear_cacheCmd('all');
579 }
580 return $tce->substNEWwithIDs['NEW'];
581 }
582
583 // RENDER LIST of pages with templates, BEGIN
584 /**
585 * Set page in array
586 *
587 * @param array $pArray
588 * @param array $rlArr
589 * @param array $row
590 * @return void
591 */
592 public function setInPageArray(&$pArray, $rlArr, $row)
593 {
594 ksort($rlArr);
595 reset($rlArr);
596 if (!$rlArr[0]['uid']) {
597 array_shift($rlArr);
598 }
599 $cEl = current($rlArr);
600 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
601 array_shift($rlArr);
602 if (!empty($rlArr)) {
603 $key = $cEl['uid'] . '.';
604 if (empty($pArray[$key])) {
605 $pArray[$key] = array();
606 }
607 $this->setInPageArray($pArray[$key], $rlArr, $row);
608 } else {
609 $key = $cEl['uid'] . '_';
610 $pArray[$key] = $row;
611 }
612 }
613
614 /**
615 * Get the list
616 *
617 * @param array $pArray
618 * @param array $lines
619 * @param int $c
620 * @return array
621 */
622 public function renderList($pArray, $lines = array(), $c = 0)
623 {
624 if (!is_array($pArray)) {
625 return $lines;
626 }
627
628 $statusCheckedIcon = $this->moduleTemplate->getIconFactory()
629 ->getIcon('status-status-checked', Icon::SIZE_SMALL)->render();
630 $i = 0;
631 foreach ($pArray as $k => $v) {
632 if (MathUtility::canBeInterpretedAsInteger($k)) {
633 $line = array();
634 $key = $k . '_';
635 $line['marginLeft'] = $c * 20;
636 $line['class'] = ($i++ % 2 === 0 ? 'bgColor4' : 'bgColor6');
637 $line['pageTitle'] = GeneralUtility::fixed_lgd_cs($pArray[$k], 30);
638 $line['icon'] = $this->moduleTemplate->getIconFactory()
639 ->getIconForRecord(
640 'pages',
641 BackendUtility::getRecordWSOL('pages', $k),
642 Icon::SIZE_SMALL
643 )->render();
644 if (!empty($pArray[$key])) {
645 $line['href'] = GeneralUtility::linkThisScript(array('id' => (int)$k));
646 $line['title'] = 'ID: ' . (int)$k;
647 $line['count'] = $pArray[$k . '_']['count'];
648 $line['root_max_val'] = ($pArray[$key]['root_max_val'] > 0 ? $statusCheckedIcon : '&nbsp;');
649 $line['root_min_val'] = ($pArray[$key]['root_min_val'] === 0 ? $statusCheckedIcon : '&nbsp;');
650 } else {
651 $line['href'] = '';
652 $line['title'] = '';
653 $line['count'] = '';
654 $line['root_max_val'] = '';
655 $line['root_min_val'] = '';
656 }
657 $lines[] = $line;
658 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
659 }
660 }
661 return $lines;
662 }
663
664 /**
665 * Returns a new standalone view, shorthand function
666 *
667 * @param string $extensionName
668 * @param string $templateName
669 * @return StandaloneView
670 */
671 protected function getFluidTemplateObject($extensionName, $templateName = 'Main')
672 {
673 /** @var StandaloneView $view */
674 $view = GeneralUtility::makeInstance(StandaloneView::class);
675 $view->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName($extensionName);
676 $view->getRenderingContext()->setControllerAction($templateName);
677 // @TODO: not sure this should stay; this value should in any case be a *proper* extension name!
678 $view->getRequest()->setControllerExtensionName('web_ts');
679 return $view;
680 }
681
682 /**
683 * @param string $action
684 * @return string
685 */
686 protected function getHookObjectForAction($action)
687 {
688 if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class][$action])) {
689 return $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class][$action];
690 }
691 return null;
692 }
693 }