‪TYPO3CMS  9.5
LoginController.php
Go to the documentation of this file.
1 <?php
2 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 
18 use Psr\Http\Message\ResponseInterface;
19 use Psr\Http\Message\ServerRequestInterface;
24 
30 {
37  public function ‪showEnableInstallToolFileAction(ServerRequestInterface $request): ResponseInterface
38  {
39  $view = $this->‪initializeStandaloneView($request, 'Login/ShowEnableInstallToolFile.html');
40  return new ‪JsonResponse([
41  'success' => true,
42  'html' => $view->render(),
43  ]);
44  }
45 
52  public function ‪showLoginAction(ServerRequestInterface $request): ResponseInterface
53  {
54  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
55  $view = $this->‪initializeStandaloneView($request, 'Login/ShowLogin.html');
56  $view->assignMultiple([
57  'siteName' => ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
58  'loginToken' => $formProtection->generateToken('installTool', 'login'),
59  'installToolEnableFilePermanent' => ‪EnableFileService::isInstallToolEnableFilePermanent(),
60  ]);
61  return new ‪JsonResponse([
62  'success' => true,
63  'html' => $view->render(),
64  ]);
65  }
66 }
‪TYPO3\CMS\Install\Controller\AbstractController\initializeStandaloneView
‪StandaloneView initializeStandaloneView(ServerRequestInterface $request, string $templatePath)
Definition: AbstractController.php:37
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:72
‪TYPO3\CMS\Install\Controller\LoginController\showEnableInstallToolFileAction
‪ResponseInterface showEnableInstallToolFileAction(ServerRequestInterface $request)
Definition: LoginController.php:37
‪TYPO3\CMS\Install\Service\EnableFileService
Definition: EnableFileService.php:24
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection
Definition: InstallToolFormProtection.php:60
‪TYPO3\CMS\Install\Controller\LoginController\showLoginAction
‪ResponseInterface showLoginAction(ServerRequestInterface $request)
Definition: LoginController.php:52
‪TYPO3\CMS\Install\Controller\LoginController
Definition: LoginController.php:30
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:3
‪TYPO3\CMS\Install\Service\EnableFileService\isInstallToolEnableFilePermanent
‪static bool isInstallToolEnableFilePermanent()
Definition: EnableFileService.php:130
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:45
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:25
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:28