2 namespace TYPO3\CMS\Form\Controller
;
5 * The form wizard controller
10 * @author Patrick Broens <patrick@patrickbroens.nl>
12 class WizardController
{
17 * Calls the requested action
21 public function dispatch() {
22 switch (\TYPO3\CMS\Core\Utility\GeneralUtility
::_GP('action')) {
37 * The action which should be taken when the wizard is loaded
41 protected function indexAction() {
42 /** @var $view \TYPO3\CMS\Form\View\Wizard\WizardView */
43 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\WizardView', $this->getRepository());
50 * The action which should be taken when the form in the wizard is saved
54 protected function saveAction() {
55 /** @var $view \TYPO3\CMS\Form\View\Wizard\SaveWizardView */
56 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\SaveWizardView', $this->getRepository());
63 * The action which should be taken when the form in the wizard is loaded
67 protected function loadAction() {
68 /** @var $view \TYPO3\CMS\Form\View\Wizard\LoadWizardView */
69 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\LoadWizardView', $this->getRepository());
74 * Gets the repository object.
76 * @return \TYPO3\CMS\Form\Domain\Repository\ContentRepository
78 protected function getRepository() {
79 return \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\Domain\\Repository\\ContentRepository');