[TASK] Remove DocumentTemplate section in Wizard controllers
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / View / Wizard / AbstractWizardView.php
1 <?php
2 namespace TYPO3\CMS\Form\View\Wizard;
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\Form\Domain\Repository\ContentRepository;
18
19 /**
20 * The form wizard load view
21 */
22 abstract class AbstractWizardView
23 {
24 /**
25 * Is the referenced record available
26 *
27 * @var bool TRUE if available, FALSE if not
28 */
29 protected $recordIsAvailable = false;
30
31 /**
32 * @var ContentRepository
33 */
34 protected $repository;
35
36 /**
37 * Returns an instance of LanguageService
38 *
39 * @return \TYPO3\CMS\Lang\LanguageService
40 */
41 protected function getLanguageService()
42 {
43 return $GLOBALS['LANG'];
44 }
45
46 /**
47 * Creates the object and calls the initialize() method.
48 *
49 * @param ContentRepository $repository
50 */
51 public function __construct(ContentRepository $repository)
52 {
53 $this->setRepository($repository);
54 $this->getLanguageService()->includeLLFile('EXT:form/Resources/Private/Language/locallang_wizard.xlf');
55 }
56
57 /**
58 * Sets the content repository to be used.
59 *
60 * @param ContentRepository $repository
61 * @return void
62 */
63 public function setRepository(ContentRepository $repository)
64 {
65 $this->repository = $repository;
66 }
67
68 /**
69 * The main render method
70 *
71 * @return void
72 */
73 abstract public function render();
74 }