[FOLLOWUP][TASK] Remove deprecated output-related code from EXT:backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Classes / RecordList.php
1 <?php
2 namespace TYPO3\CMS\Recordlist;
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\Clipboard\Clipboard;
20 use TYPO3\CMS\Backend\Module\AbstractModule;
21 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
22 use TYPO3\CMS\Backend\Template\DocumentTemplate;
23 use TYPO3\CMS\Backend\Template\ModuleTemplate;
24 use TYPO3\CMS\Backend\Utility\BackendUtility;
25 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
26 use TYPO3\CMS\Core\DataHandling\DataHandler;
27 use TYPO3\CMS\Core\Imaging\Icon;
28 use TYPO3\CMS\Core\Imaging\IconFactory;
29 use TYPO3\CMS\Core\Messaging\FlashMessage;
30 use TYPO3\CMS\Core\Messaging\FlashMessageService;
31 use TYPO3\CMS\Core\Page\PageRenderer;
32 use TYPO3\CMS\Core\Type\Bitmask\Permission;
33 use TYPO3\CMS\Core\TypoScript\TypoScriptService;
34 use TYPO3\CMS\Core\Utility\GeneralUtility;
35 use TYPO3\CMS\Lang\LanguageService;
36
37 /**
38 * Script Class for the Web > List module; rendering the listing of records on a page
39 */
40 class RecordList extends AbstractModule
41 {
42 /**
43 * Page Id for which to make the listing
44 *
45 * @var int
46 */
47 public $id;
48
49 /**
50 * Pointer - for browsing list of records.
51 *
52 * @var int
53 */
54 public $pointer;
55
56 /**
57 * Thumbnails or not
58 *
59 * @var string
60 */
61 public $imagemode;
62
63 /**
64 * Which table to make extended listing for
65 *
66 * @var string
67 */
68 public $table;
69
70 /**
71 * Search-fields
72 *
73 * @var string
74 */
75 public $search_field;
76
77 /**
78 * Search-levels
79 *
80 * @var int
81 */
82 public $search_levels;
83
84 /**
85 * Show-limit
86 *
87 * @var int
88 */
89 public $showLimit;
90
91 /**
92 * Return URL
93 *
94 * @var string
95 */
96 public $returnUrl;
97
98 /**
99 * Clear-cache flag - if set, clears page cache for current id.
100 *
101 * @var bool
102 */
103 public $clear_cache;
104
105 /**
106 * Command: Eg. "delete" or "setCB" (for DataHandler / clipboard operations)
107 *
108 * @var string
109 */
110 public $cmd;
111
112 /**
113 * Table on which the cmd-action is performed.
114 *
115 * @var string
116 */
117 public $cmd_table;
118
119 /**
120 * Page select perms clause
121 *
122 * @var int
123 */
124 public $perms_clause;
125
126 /**
127 * Module TSconfig
128 *
129 * @var array
130 */
131 public $modTSconfig;
132
133 /**
134 * Current ids page record
135 *
136 * @var mixed[]|bool
137 */
138 public $pageinfo;
139
140 /**
141 * Document template object
142 *
143 * @var DocumentTemplate
144 */
145 public $doc;
146
147 /**
148 * Menu configuration
149 *
150 * @var string[]
151 */
152 public $MOD_MENU = [];
153
154 /**
155 * Module settings (session variable)
156 *
157 * @var string[]
158 */
159 public $MOD_SETTINGS = [];
160
161 /**
162 * Module output accumulation
163 *
164 * @var string
165 */
166 public $content;
167
168 /**
169 * The name of the module
170 *
171 * @var string
172 */
173 protected $moduleName = 'web_list';
174
175 /**
176 * @var string
177 */
178 public $body = '';
179
180 /**
181 * @var PageRenderer
182 */
183 protected $pageRenderer = null;
184
185 /**
186 * @var IconFactory
187 */
188 protected $iconFactory;
189
190 /**
191 * Constructor
192 */
193 public function __construct()
194 {
195 parent::__construct();
196 $this->getLanguageService()->includeLLFile('EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf');
197 $this->moduleTemplate->getPageRenderer()->loadJquery();
198 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Recordlist/FieldSelectBox');
199 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Recordlist/Recordlist');
200 }
201
202 /**
203 * Initializing the module
204 */
205 public function init()
206 {
207 $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
208 $backendUser = $this->getBackendUserAuthentication();
209 $this->perms_clause = $backendUser->getPagePermsClause(1);
210 // Get session data
211 $sessionData = $backendUser->getSessionData(__CLASS__);
212 $this->search_field = !empty($sessionData['search_field']) ? $sessionData['search_field'] : '';
213 // GPvars:
214 $this->id = (int)GeneralUtility::_GP('id');
215 $this->pointer = GeneralUtility::_GP('pointer');
216 $this->imagemode = GeneralUtility::_GP('imagemode');
217 $this->table = GeneralUtility::_GP('table');
218 $this->search_field = GeneralUtility::_GP('search_field');
219 $this->search_levels = (int)GeneralUtility::_GP('search_levels');
220 $this->showLimit = GeneralUtility::_GP('showLimit');
221 $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
222 $this->clear_cache = GeneralUtility::_GP('clear_cache');
223 $this->cmd = GeneralUtility::_GP('cmd');
224 $this->cmd_table = GeneralUtility::_GP('cmd_table');
225 $sessionData['search_field'] = $this->search_field;
226 // Initialize menu
227 $this->menuConfig();
228 // Store session data
229 $backendUser->setAndSaveSessionData(self::class, $sessionData);
230 $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf');
231 }
232
233 /**
234 * Initialize function menu array
235 */
236 public function menuConfig()
237 {
238 // MENU-ITEMS:
239 $this->MOD_MENU = [
240 'bigControlPanel' => '',
241 'clipBoard' => '',
242 'localization' => ''
243 ];
244 // Loading module configuration:
245 $this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.' . $this->moduleName);
246 // Clean up settings:
247 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName);
248 }
249
250 /**
251 * Clears page cache for the current id, $this->id
252 */
253 public function clearCache()
254 {
255 if ($this->clear_cache) {
256 $tce = GeneralUtility::makeInstance(DataHandler::class);
257 $tce->start([], []);
258 $tce->clear_cacheCmd($this->id);
259 }
260 }
261
262 /**
263 * Main function, starting the rendering of the list.
264 */
265 public function main()
266 {
267 $backendUser = $this->getBackendUserAuthentication();
268 $lang = $this->getLanguageService();
269 // Loading current page record and checking access:
270 $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
271 $access = is_array($this->pageinfo) ? 1 : 0;
272 // Start document template object:
273 // We need to keep this due to deeply nested dependencies
274 $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
275
276 $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/AjaxDataHandler');
277 $calcPerms = $backendUser->calcPerms($this->pageinfo);
278 $userCanEditPage = $calcPerms & Permission::PAGE_EDIT && !empty($this->id) && ($backendUser->isAdmin() || (int)$this->pageinfo['editlock'] === 0);
279 if ($userCanEditPage) {
280 $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/PageActions', 'function(PageActions) {
281 PageActions.setPageId(' . (int)$this->id . ');
282 PageActions.initializePageTitleRenaming();
283 }');
284 }
285 $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Recordlist/Tooltip');
286 // Apply predefined values for hidden checkboxes
287 // Set predefined value for DisplayBigControlPanel:
288 if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'activated') {
289 $this->MOD_SETTINGS['bigControlPanel'] = true;
290 } elseif ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'deactivated') {
291 $this->MOD_SETTINGS['bigControlPanel'] = false;
292 }
293 // Set predefined value for Clipboard:
294 if ($this->modTSconfig['properties']['enableClipBoard'] === 'activated') {
295 $this->MOD_SETTINGS['clipBoard'] = true;
296 } elseif ($this->modTSconfig['properties']['enableClipBoard'] === 'deactivated') {
297 $this->MOD_SETTINGS['clipBoard'] = false;
298 } else {
299 if ($this->MOD_SETTINGS['clipBoard'] === null) {
300 $this->MOD_SETTINGS['clipBoard'] = true;
301 }
302 }
303 // Set predefined value for LocalizationView:
304 if ($this->modTSconfig['properties']['enableLocalizationView'] === 'activated') {
305 $this->MOD_SETTINGS['localization'] = true;
306 } elseif ($this->modTSconfig['properties']['enableLocalizationView'] === 'deactivated') {
307 $this->MOD_SETTINGS['localization'] = false;
308 }
309
310 // Initialize the dblist object:
311 /** @var $dblist RecordList\DatabaseRecordList */
312 $dblist = GeneralUtility::makeInstance(RecordList\DatabaseRecordList::class);
313 $dblist->script = BackendUtility::getModuleUrl('web_list');
314 $dblist->calcPerms = $calcPerms;
315 $dblist->thumbs = $backendUser->uc['thumbnailsByDefault'];
316 $dblist->returnUrl = $this->returnUrl;
317 $dblist->allFields = $this->MOD_SETTINGS['bigControlPanel'] || $this->table ? 1 : 0;
318 $dblist->localizationView = $this->MOD_SETTINGS['localization'];
319 $dblist->showClipboard = 1;
320 $dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
321 $dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
322 $dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
323 $dblist->hideTranslations = $this->modTSconfig['properties']['hideTranslations'];
324 $dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
325 $dblist->allowedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['allowedNewTables'], true);
326 $dblist->deniedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['deniedNewTables'], true);
327 $dblist->newWizards = $this->modTSconfig['properties']['newWizards'] ? 1 : 0;
328 $dblist->pageRow = $this->pageinfo;
329 $dblist->counter++;
330 $dblist->MOD_MENU = ['bigControlPanel' => '', 'clipBoard' => '', 'localization' => ''];
331 $dblist->modTSconfig = $this->modTSconfig;
332 $clickTitleMode = trim($this->modTSconfig['properties']['clickTitleMode']);
333 $dblist->clickTitleMode = $clickTitleMode === '' ? 'edit' : $clickTitleMode;
334 if (isset($this->modTSconfig['properties']['tableDisplayOrder.'])) {
335 $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);
336 $dblist->setTableDisplayOrder($typoScriptService->convertTypoScriptArrayToPlainArray($this->modTSconfig['properties']['tableDisplayOrder.']));
337 }
338 // Clipboard is initialized:
339 // Start clipboard
340 $dblist->clipObj = GeneralUtility::makeInstance(Clipboard::class);
341 // Initialize - reads the clipboard content from the user session
342 $dblist->clipObj->initializeClipboard();
343 // Clipboard actions are handled:
344 // CB is the clipboard command array
345 $CB = GeneralUtility::_GET('CB');
346 if ($this->cmd === 'setCB') {
347 // CBH is all the fields selected for the clipboard, CBC is the checkbox fields which were checked.
348 // By merging we get a full array of checked/unchecked elements
349 // This is set to the 'el' array of the CB after being parsed so only the table in question is registered.
350 $CB['el'] = $dblist->clipObj->cleanUpCBC(array_merge(GeneralUtility::_POST('CBH'), (array)GeneralUtility::_POST('CBC')), $this->cmd_table);
351 }
352 if (!$this->MOD_SETTINGS['clipBoard']) {
353 // If the clipboard is NOT shown, set the pad to 'normal'.
354 $CB['setP'] = 'normal';
355 }
356 // Execute commands.
357 $dblist->clipObj->setCmd($CB);
358 // Clean up pad
359 $dblist->clipObj->cleanCurrent();
360 // Save the clipboard content
361 $dblist->clipObj->endClipboard();
362 // This flag will prevent the clipboard panel in being shown.
363 // It is set, if the clickmenu-layer is active AND the extended view is not enabled.
364 $dblist->dontShowClipControlPanels = ($dblist->clipObj->current === 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers']);
365 // If there is access to the page or root page is used for searching, then render the list contents and set up the document template object:
366 if ($access || ($this->id === 0 && $this->search_levels !== 0 && $this->search_field !== '')) {
367 // Deleting records...:
368 // Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
369 if ($this->cmd === 'delete') {
370 $items = $dblist->clipObj->cleanUpCBC(GeneralUtility::_POST('CBC'), $this->cmd_table, 1);
371 if (!empty($items)) {
372 $cmd = [];
373 foreach ($items as $iK => $value) {
374 $iKParts = explode('|', $iK);
375 $cmd[$iKParts[0]][$iKParts[1]]['delete'] = 1;
376 }
377 $tce = GeneralUtility::makeInstance(DataHandler::class);
378 $tce->start([], $cmd);
379 $tce->process_cmdmap();
380 if (isset($cmd['pages'])) {
381 BackendUtility::setUpdateSignal('updatePageTree');
382 }
383 $tce->printLogErrorMessages(GeneralUtility::getIndpEnv('REQUEST_URI'));
384 }
385 }
386 // Initialize the listing object, dblist, for rendering the list:
387 $this->pointer = max(0, (int)$this->pointer);
388 $dblist->start($this->id, $this->table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
389 $dblist->setDispFields();
390 // Render the list of tables:
391 $dblist->generateList();
392 $listUrl = $dblist->listURL();
393 // Add JavaScript functions to the page:
394
395 $this->moduleTemplate->addJavaScriptCode(
396 'RecordListInlineJS',
397 '
398 function jumpExt(URL,anchor) { //
399 var anc = anchor?anchor:"";
400 window.location.href = URL+(T3_THIS_LOCATION?"&returnUrl="+T3_THIS_LOCATION:"")+anc;
401 return false;
402 }
403 function jumpSelf(URL) { //
404 window.location.href = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:"");
405 return false;
406 }
407 function jumpToUrl(URL) {
408 window.location.href = URL;
409 return false;
410 }
411
412 function setHighlight(id) { //
413 top.fsMod.recentIds["web"]=id;
414 top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank; // For highlighting
415
416 if (top.nav_frame && top.nav_frame.refresh_nav) {
417 top.nav_frame.refresh_nav();
418 }
419 }
420 ' . $this->moduleTemplate->redirectUrls($listUrl) . '
421 ' . $dblist->CBfunctions() . '
422 function editRecords(table,idList,addParams,CBflag) { //
423 window.location.href="' . BackendUtility::getModuleUrl('record_edit', ['returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')]) . '&edit["+table+"]["+idList+"]=edit"+addParams;
424 }
425 function editList(table,idList) { //
426 var list="";
427
428 // Checking how many is checked, how many is not
429 var pointer=0;
430 var pos = idList.indexOf(",");
431 while (pos!=-1) {
432 if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) {
433 list+=idList.substr(pointer,pos-pointer)+",";
434 }
435 pointer=pos+1;
436 pos = idList.indexOf(",",pointer);
437 }
438 if (cbValue(table+"|"+idList.substr(pointer))) {
439 list+=idList.substr(pointer)+",";
440 }
441
442 return list ? list : idList;
443 }
444
445 if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
446 '
447 );
448
449 // Setting up the context sensitive menu:
450 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
451 }
452 // access
453 // Begin to compile the whole page, starting out with page header:
454 if (!$this->id) {
455 $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
456 } else {
457 $title = $this->pageinfo['title'];
458 }
459 $this->body = $this->moduleTemplate->header($title);
460 $this->moduleTemplate->setTitle($title);
461
462 if (!empty($dblist->HTMLcode)) {
463 $output = $dblist->HTMLcode;
464 } else {
465 $output = '';
466 $flashMessage = GeneralUtility::makeInstance(
467 FlashMessage::class,
468 $lang->getLL('noRecordsOnThisPage'),
469 '',
470 FlashMessage::INFO
471 );
472 /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
473 $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
474 /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
475 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
476 $defaultFlashMessageQueue->enqueue($flashMessage);
477 }
478
479 $this->body .= '<form action="' . htmlspecialchars($dblist->listURL()) . '" method="post" name="dblistForm">';
480 $this->body .= $output;
481 $this->body .= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
482 // If a listing was produced, create the page footer with search form etc:
483 if ($dblist->HTMLcode) {
484 // Making field select box (when extended view for a single table is enabled):
485 if ($dblist->table) {
486 $this->body .= $dblist->fieldSelectBox($dblist->table);
487 }
488 // Adding checkbox options for extended listing and clipboard display:
489 $this->body .= '
490
491 <!--
492 Listing options for extended view, clipboard and localization view
493 -->
494 <div class="typo3-listOptions">
495 <form action="" method="post">';
496
497 // Add "display bigControlPanel" checkbox:
498 if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'selectable') {
499 $this->body .= '<div class="checkbox">' .
500 '<label for="checkLargeControl">' .
501 BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLargeControl"') .
502 BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', htmlspecialchars($lang->getLL('largeControl'))) .
503 '</label>' .
504 '</div>';
505 }
506
507 // Add "clipboard" checkbox:
508 if ($this->modTSconfig['properties']['enableClipBoard'] === 'selectable') {
509 if ($dblist->showClipboard) {
510 $this->body .= '<div class="checkbox">' .
511 '<label for="checkShowClipBoard">' .
512 BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', $this->table ? '&table=' . $this->table : '', 'id="checkShowClipBoard"') .
513 BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', htmlspecialchars($lang->getLL('showClipBoard'))) .
514 '</label>' .
515 '</div>';
516 }
517 }
518
519 // Add "localization view" checkbox:
520 if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
521 $this->body .= '<div class="checkbox">' .
522 '<label for="checkLocalization">' .
523 BackendUtility::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"') .
524 BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', htmlspecialchars($lang->getLL('localization'))) .
525 '</label>' .
526 '</div>';
527 }
528
529 $this->body .= '
530 </form>
531 </div>';
532 }
533 // Printing clipboard if enabled
534 if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard && ($dblist->HTMLcode || $dblist->clipObj->hasElements())) {
535 $this->body .= '<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() . '</div>';
536 }
537 // Additional footer content
538 $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook'];
539 if (is_array($footerContentHook)) {
540 foreach ($footerContentHook as $hook) {
541 $params = [];
542 $this->body .= GeneralUtility::callUserFunction($hook, $params, $this);
543 }
544 }
545 // Setting up the buttons for docheader
546 $dblist->getDocHeaderButtons($this->moduleTemplate);
547 // searchbox toolbar
548 if (!$this->modTSconfig['properties']['disableSearchBox'] && ($dblist->HTMLcode || !empty($dblist->searchString))) {
549 $this->content = $dblist->getSearchBox();
550 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ToggleSearchToolbox');
551
552 $searchButton = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar()->makeLinkButton();
553 $searchButton
554 ->setHref('#')
555 ->setClasses('t3js-toggle-search-toolbox')
556 ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.title.searchIcon'))
557 ->setIcon($this->iconFactory->getIcon('actions-search', Icon::SIZE_SMALL));
558 $this->moduleTemplate->getDocHeaderComponent()->getButtonBar()->addButton($searchButton,
559 ButtonBar::BUTTON_POSITION_LEFT, 90);
560 }
561
562 if ($this->pageinfo) {
563 $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
564 }
565
566 // Build the <body> for the module
567 $this->content .= $this->body;
568 }
569
570 /**
571 * Injects the request object for the current request or subrequest
572 * Simply calls main() and init() and outputs the content
573 *
574 * @param ServerRequestInterface $request the current request
575 * @param ResponseInterface $response
576 * @return ResponseInterface the response with the content
577 */
578 public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
579 {
580 BackendUtility::lockRecords();
581 $GLOBALS['SOBE'] = $this;
582 $this->init();
583 $this->clearCache();
584 $this->main();
585 $this->moduleTemplate->setContent($this->content);
586 $response->getBody()->write($this->moduleTemplate->renderContent());
587 return $response;
588 }
589
590 /**
591 * @return ModuleTemplate
592 */
593 public function getModuleTemplate()
594 {
595 return $this->moduleTemplate;
596 }
597
598 /**
599 * @return BackendUserAuthentication
600 */
601 protected function getBackendUserAuthentication()
602 {
603 return $GLOBALS['BE_USER'];
604 }
605
606 /**
607 * @return LanguageService
608 */
609 protected function getLanguageService()
610 {
611 return $GLOBALS['LANG'];
612 }
613
614 /**
615 * @return PageRenderer
616 */
617 protected function getPageRenderer()
618 {
619 if ($this->pageRenderer === null) {
620 $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
621 }
622
623 return $this->pageRenderer;
624 }
625 }