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