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>
36 * @license http://www.gnu.org/copyleft/gpl.html
39 class tx_form_controller_wizard
{
43 * Calls the requested action
47 public function dispatch() {
48 switch(t3lib_div
::_GP('action')) {
63 * The action which should be taken when the wizard is loaded
67 protected function indexAction() {
68 /** @var $repository tx_form_domain_repository_content */
69 $repository = t3lib_div
::makeInstance('tx_form_domain_repository_content');
71 /** @var $view tx_form_view_wizard_wizard */
72 $view = t3lib_div
::makeInstance('tx_form_view_wizard_wizard');
73 $view->setRepository($repository);
80 * The action which should be taken when the form in the wizard is saved
84 protected function saveAction() {
85 /** @var $repository tx_form_domain_repository_content */
86 $repository = t3lib_div
::makeInstance('tx_form_domain_repository_content');
88 /** @var $view tx_form_view_wizard_save */
89 $view = t3lib_div
::makeInstance('tx_form_view_wizard_save');
90 $view->setRepository($repository);
97 * The action which should be taken when the form in the wizard is loaded
101 protected function loadAction() {
102 /** @var $repository tx_form_domain_repository_content */
103 $repository = t3lib_div
::makeInstance('tx_form_domain_repository_content');
105 /** @var $view tx_form_view_wizard_load */
106 $view = t3lib_div
::makeInstance('tx_form_view_wizard_load');
107 $view->setRepository($repository);
112 /** @var $wizard tx_form_controller_wizard */
113 $wizard = t3lib_div
::makeInstance('tx_form_controller_wizard');