2 namespace TYPO3\CMS\Form\Controller
;
5 * The form wizard controller
8 * @author Patrick Broens <patrick@patrickbroens.nl>
10 class WizardController
{
15 * Calls the requested action
19 public function dispatch() {
20 switch (\TYPO3\CMS\Core\Utility\GeneralUtility
::_GP('action')) {
35 * The action which should be taken when the wizard is loaded
39 protected function indexAction() {
40 /** @var $view \TYPO3\CMS\Form\View\Wizard\WizardView */
41 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\WizardView', $this->getRepository());
48 * The action which should be taken when the form in the wizard is saved
52 protected function saveAction() {
53 /** @var $view \TYPO3\CMS\Form\View\Wizard\SaveWizardView */
54 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\SaveWizardView', $this->getRepository());
61 * The action which should be taken when the form in the wizard is loaded
65 protected function loadAction() {
66 /** @var $view \TYPO3\CMS\Form\View\Wizard\LoadWizardView */
67 $view = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\View\\Wizard\\LoadWizardView', $this->getRepository());
72 * Gets the repository object.
74 * @return \TYPO3\CMS\Form\Domain\Repository\ContentRepository
76 protected function getRepository() {
77 return \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Form\\Domain\\Repository\\ContentRepository');