09346919df4d2216a386f286ef3f4c9adaa88615
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / LoginFramesetController.php
1 <?php
2 namespace TYPO3\CMS\Backend\Controller;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Backend\Utility\BackendUtility;
18 use TYPO3\CMS\Core\Page\PageRenderer;
19 use TYPO3\CMS\Core\Utility\GeneralUtility;
20
21 /**
22 * Script Class, putting the frameset together.
23 */
24 class LoginFramesetController {
25
26 /**
27 * @var string
28 */
29 protected $content;
30
31 /**
32 * Main function.
33 * Creates the header code and the frameset for the two frames.
34 *
35 * @return void
36 */
37 public function main() {
38 $title = 'TYPO3 Re-Login (' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ')';
39 $this->getDocumentTemplate()->startPage($title);
40
41 // Create the frameset for the window
42 $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) . '
43 <frameset rows="*,1">
44 <frame name="login" src="index.php?loginRefresh=1" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
45 <frame name="dummy" src="' . htmlspecialchars(BackendUtility::getModuleUrl('dummy')) . '" marginwidth="0" marginheight="0" scrolling="auto" noresize="noresize" />
46 </frameset>
47 </html>';
48 }
49
50 /**
51 * Outputs the page content.
52 *
53 * @return void
54 */
55 public function printContent() {
56 echo $this->content;
57 }
58
59 /**
60 * Returns an instance of DocumentTemplate
61 *
62 * @return \TYPO3\CMS\Backend\Template\DocumentTemplate
63 */
64 protected function getDocumentTemplate() {
65 return $GLOBALS['TBE_TEMPLATE'];
66 }
67
68 /**
69 * @return PageRenderer
70 */
71 protected function getPageRenderer() {
72 return GeneralUtility::makeInstance(PageRenderer::class);
73 }
74
75 }