‪TYPO3CMS  11.5
BackendLogModuleBootstrap.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
18 use Psr\Http\Message\ResponseInterface;
19 use Psr\Http\Message\ServerRequestInterface;
24 
35 {
39  public function ‪main(ServerRequestInterface $request): ResponseInterface
40  {
41  $queryParams = $request->getQueryParams();
42  $queryParams['tx_belog_system_beloglog']['pageId'] = $request->getQueryParams()['id'] ?? $request->getParsedBody()['id'] ?? 0;
43  $queryParams['tx_belog_system_beloglog']['layout'] = 'Plain';
44  $request = $request->withQueryParams($queryParams);
45 
46  $options = [
47  'moduleName' => 'system_BelogLog',
48  'moduleConfiguration' => [
49  'extensionName' => 'Belog',
50  ],
51  ];
52  $routePath = GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute($options['moduleName'])->getPath();
53 
54  return GeneralUtility::makeInstance(Bootstrap::class)->handleBackendRequest(
55  $request->withAttribute(
56  'route',
57  GeneralUtility::makeInstance(Route::class, $routePath, $options)
58  )
59  );
60  }
61 }
‪TYPO3\CMS\Backend\Routing\Route
Definition: Route.php:24
‪TYPO3\CMS\Belog\Module
Definition: BackendLogModuleBootstrap.php:16
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:40
‪TYPO3\CMS\Belog\Module\BackendLogModuleBootstrap\main
‪main(ServerRequestInterface $request)
Definition: BackendLogModuleBootstrap.php:39
‪TYPO3\CMS\Belog\Module\BackendLogModuleBootstrap
Definition: BackendLogModuleBootstrap.php:35
‪TYPO3\CMS\Extbase\Core\Bootstrap
Definition: Bootstrap.php:42
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50