cd2a46f11af4f2592ed214e78ef10808bddb1140
[Packages/TYPO3.CMS.git] / typo3 / sysext / adminpanel / Classes / Modules / Info / RequestInformation.php
1 <?php
2 declare(strict_types = 1);
3
4 namespace TYPO3\CMS\Adminpanel\Modules\Info;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 use TYPO3\CMS\Adminpanel\Modules\AbstractSubModule;
20 use TYPO3\CMS\Core\Utility\GeneralUtility;
21 use TYPO3\CMS\Fluid\View\StandaloneView;
22
23 /**
24 * RequestInformation submodule of the admin panel
25 */
26 class RequestInformation extends AbstractSubModule
27 {
28 /**
29 * @inheritdoc
30 */
31 public function getIdentifier(): string
32 {
33 return 'info-request';
34 }
35
36 /**
37 * @inheritdoc
38 */
39 public function getLabel(): string
40 {
41 return $this->getLanguageService()->sL(
42 'LLL:EXT:adminpanel/Resources/Private/Language/locallang_info.xlf:sub.request.label'
43 );
44 }
45
46 /**
47 * @inheritdoc
48 */
49 public function getContent(): string
50 {
51 $view = GeneralUtility::makeInstance(StandaloneView::class);
52 $templateNameAndPath = 'EXT:adminpanel/Resources/Private/Templates/Modules/Info/RequestInformation.html';
53 $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
54 $view->setPartialRootPaths(['EXT:adminpanel/Resources/Private/Partials']);
55
56 $view->assignMultiple(
57 [
58 'post' => $_POST,
59 'get' => $_GET,
60 'cookie' => $_COOKIE,
61 'session' => $_SESSION,
62 'server' => $_SERVER,
63 ]
64 );
65
66 return $view->render();
67 }
68 }