[BUGFIX] Make alphabetic filter work with umlauts
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Controller / Wizard.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2010 Patrick Broens (patrick@patrickbroens.nl)
6 * All rights reserved
7 *
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.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
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.
21 *
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');
28
29 /**
30 * The form wizard controller
31 *
32 * @category Controller
33 * @package TYPO3
34 * @subpackage form
35 * @author Patrick Broens <patrick@patrickbroens.nl>
36 */
37 class tx_form_Controller_Wizard {
38 /**
39 * Dispatch on action
40 *
41 * Calls the requested action
42 *
43 * @return void
44 */
45 public function dispatch() {
46 switch(t3lib_div::_GP('action')) {
47 case 'save':
48 $this->saveAction();
49 break;
50 case 'load':
51 $this->loadAction();
52 break;
53 default:
54 $this->indexAction();
55 }
56 }
57
58 /**
59 * The index action
60 *
61 * The action which should be taken when the wizard is loaded
62 *
63 * @return void
64 */
65 protected function indexAction() {
66 /** @var $view tx_form_View_Wizard_Wizard */
67 $view = t3lib_div::makeInstance('tx_form_View_Wizard_Wizard', $this->getRepository());
68 $view->render();
69 }
70
71 /**
72 * The save action
73 *
74 * The action which should be taken when the form in the wizard is saved
75 *
76 * @return void
77 */
78 protected function saveAction() {
79 /** @var $view tx_form_View_Wizard_Save */
80 $view = t3lib_div::makeInstance('tx_form_View_Wizard_Save', $this->getRepository());
81 $view->render();
82 }
83
84 /**
85 * The load action
86 *
87 * The action which should be taken when the form in the wizard is loaded
88 *
89 * @return void
90 */
91 protected function loadAction() {
92 /** @var $view tx_form_View_Wizard_Load */
93 $view = t3lib_div::makeInstance('tx_form_View_Wizard_Load', $this->getRepository());
94 $view->render();
95 }
96
97 /**
98 * Gets the repository object.
99 *
100 * @return tx_form_Domain_Repository_Content
101 */
102 protected function getRepository() {
103 return t3lib_div::makeInstance('tx_form_Domain_Repository_Content');
104 }
105 }
106
107 /** @var $wizard tx_form_Controller_Wizard */
108 $wizard = t3lib_div::makeInstance('tx_form_Controller_Wizard');
109 $wizard->dispatch();
110 ?>