‪TYPO3CMS  9.5
RequestInformation.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
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 Psr\Http\Message\ServerRequestInterface;
25 
32 {
36  public function ‪getIdentifier(): string
37  {
38  return 'info-request';
39  }
40 
44  public function ‪getLabel(): string
45  {
46  return $this->‪getLanguageService()->‪sL(
47  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_info.xlf:sub.request.label'
48  );
49  }
50 
54  public function ‪getDataToStore(ServerRequestInterface $request): ‪ModuleData
55  {
56  return new ‪ModuleData(
57  [
58  'post' => $_POST,
59  'get' => $_GET,
60  'cookie' => $_COOKIE,
61  'session' => $_SESSION,
62  'server' => $_SERVER,
63  ]
64  );
65  }
66 
70  public function ‪getContent(‪ModuleData $data): string
71  {
72  $view = GeneralUtility::makeInstance(StandaloneView::class);
73  $templateNameAndPath = 'EXT:adminpanel/Resources/Private/Templates/Modules/Info/RequestInformation.html';
74  $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
75  $view->setPartialRootPaths(['EXT:adminpanel/Resources/Private/Partials']);
76 
77  $view->assignMultiple($data->getArrayCopy());
78 
79  return $view->render();
80  }
81 }
‪TYPO3\CMS\Adminpanel\Modules\Info\RequestInformation
Definition: RequestInformation.php:32
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractSubModule\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractSubModule.php:33
‪TYPO3\CMS\Adminpanel\Modules\Info\RequestInformation\getIdentifier
‪getIdentifier()
Definition: RequestInformation.php:36
‪TYPO3\CMS\Adminpanel\Modules\Info\RequestInformation\getContent
‪getContent(ModuleData $data)
Definition: RequestInformation.php:70
‪TYPO3\CMS\Adminpanel\ModuleApi\DataProviderInterface
Definition: DataProviderInterface.php:29
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:158
‪TYPO3\CMS\Adminpanel\Modules\Info
Definition: GeneralInformation.php:4
‪TYPO3\CMS\Adminpanel\Modules\Info\RequestInformation\getDataToStore
‪getDataToStore(ServerRequestInterface $request)
Definition: RequestInformation.php:54
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:32
‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleData
Definition: ModuleData.php:26
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractSubModule
Definition: AbstractSubModule.php:27
‪TYPO3\CMS\Adminpanel\Modules\Info\RequestInformation\getLabel
‪getLabel()
Definition: RequestInformation.php:44