‪TYPO3CMS  ‪main
AbstractController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ServerRequestInterface;
27 use TYPO3Fluid\Fluid\View\TemplateView as FluidTemplateView;
28 
35 {
39  protected function ‪initializeView(ServerRequestInterface $request): ‪ViewInterface
40  {
41  $templatePaths = [
42  'templateRootPaths' => ['EXT:install/Resources/Private/Templates'],
43  'partialRootPaths' => ['EXT:install/Resources/Private/Partials'],
44  ];
45  $renderingContext = GeneralUtility::makeInstance(RenderingContextFactory::class)->create($templatePaths);
46  $fluidView = new FluidTemplateView($renderingContext);
47  $view = new ‪FluidViewAdapter($fluidView);
48  $view->assignMultiple([
49  'controller' => $request->getQueryParams()['install']['controller'] ?? 'maintenance',
50  'context' => $request->getQueryParams()['install']['context'] ?? '',
51  'composerMode' => ‪Environment::isComposerMode(),
52  'currentTypo3Version' => (string)(new ‪Typo3Version()),
53  ]);
54  return $view;
55  }
56 }
‪TYPO3\CMS\Core\View\ViewInterface
Definition: ViewInterface.php:24
‪TYPO3\CMS\Core\Information\Typo3Version
Definition: Typo3Version.php:21
‪TYPO3\CMS\Core\Core\Environment\isComposerMode
‪static isComposerMode()
Definition: Environment.php:137
‪TYPO3\CMS\Core\View\FluidViewAdapter
Definition: FluidViewAdapter.php:28
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:18
‪TYPO3\CMS\Install\Controller\AbstractController\initializeView
‪initializeView(ServerRequestInterface $request)
Definition: AbstractController.php:39
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory
Definition: RenderingContextFactory.php:51
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:35
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52