2 /***************************************************************
5 * (c) 2010 Patrick Broens (patrick@patrickbroens.nl)
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24 define('TYPO3_MOD_PATH', 'sysext/form/Classes/Controller/');
25 $BACK_PATH = '../../../../';
26 require($BACK_PATH . 'init.php');
27 require($BACK_PATH . 'template.php');
30 * The form wizard controller
32 * @category Controller
35 * @author Patrick Broens <patrick@patrickbroens.nl>
37 class tx_form_Controller_Wizard
{
41 * Calls the requested action
45 public function dispatch() {
46 switch(t3lib_div
::_GP('action')) {
61 * The action which should be taken when the wizard is loaded
65 protected function indexAction() {
66 /** @var $view tx_form_View_Wizard_Wizard */
67 $view = t3lib_div
::makeInstance('tx_form_View_Wizard_Wizard', $this->getRepository());
74 * The action which should be taken when the form in the wizard is saved
78 protected function saveAction() {
79 /** @var $view tx_form_View_Wizard_Save */
80 $view = t3lib_div
::makeInstance('tx_form_View_Wizard_Save', $this->getRepository());
87 * The action which should be taken when the form in the wizard is loaded
91 protected function loadAction() {
92 /** @var $view tx_form_View_Wizard_Load */
93 $view = t3lib_div
::makeInstance('tx_form_View_Wizard_Load', $this->getRepository());
98 * Gets the repository object.
100 * @return tx_form_Domain_Repository_Content
102 protected function getRepository() {
103 return t3lib_div
::makeInstance('tx_form_Domain_Repository_Content');
107 /** @var $wizard tx_form_Controller_Wizard */
108 $wizard = t3lib_div
::makeInstance('tx_form_Controller_Wizard');