‪TYPO3CMS  10.4
LoginController.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\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
26 
32 {
39  public function ‪showEnableInstallToolFileAction(ServerRequestInterface $request): ResponseInterface
40  {
41  $view = $this->‪initializeStandaloneView($request, 'Login/ShowEnableInstallToolFile.html');
42  return new ‪JsonResponse([
43  'success' => true,
44  'html' => $view->render(),
45  ]);
46  }
47 
54  public function ‪showLoginAction(ServerRequestInterface $request): ResponseInterface
55  {
56  $formProtection = ‪FormProtectionFactory::get(InstallToolFormProtection::class);
57  $view = $this->‪initializeStandaloneView($request, 'Login/ShowLogin.html');
58  $view->assignMultiple([
59  'siteName' => ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
60  'loginToken' => $formProtection->generateToken('installTool', 'login'),
61  'installToolEnableFilePermanent' => ‪EnableFileService::isInstallToolEnableFilePermanent(),
62  ]);
63  return new ‪JsonResponse([
64  'success' => true,
65  'html' => $view->render(),
66  ]);
67  }
68 }
‪TYPO3\CMS\Install\Controller\AbstractController\initializeStandaloneView
‪StandaloneView initializeStandaloneView(ServerRequestInterface $request, string $templatePath)
Definition: AbstractController.php:40
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:74
‪TYPO3\CMS\Install\Controller\LoginController\showEnableInstallToolFileAction
‪ResponseInterface showEnableInstallToolFileAction(ServerRequestInterface $request)
Definition: LoginController.php:39
‪TYPO3\CMS\Install\Service\EnableFileService
Definition: EnableFileService.php:26
‪TYPO3\CMS\Core\FormProtection\InstallToolFormProtection
Definition: InstallToolFormProtection.php:61
‪TYPO3\CMS\Install\Controller\LoginController\showLoginAction
‪ResponseInterface showLoginAction(ServerRequestInterface $request)
Definition: LoginController.php:54
‪TYPO3\CMS\Install\Controller\LoginController
Definition: LoginController.php:32
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:18
‪TYPO3\CMS\Install\Service\EnableFileService\isInstallToolEnableFilePermanent
‪static bool isInstallToolEnableFilePermanent()
Definition: EnableFileService.php:132
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:47
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:26
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:31