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