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