* @license http://www.gnu.org/copyleft/gpl.html * @version $Id$ */ class tx_form_controller_wizard { /** * Dispatch on action * * Calls the requested action * * @return void */ public function dispatch() { switch(t3lib_div::_GP('action')) { case 'save': $this->saveAction(); break; case 'load': $this->loadAction(); break; default: $this->indexAction(); } } /** * The index action * * The action which should be taken when the wizard is loaded * * @return void */ protected function indexAction() { /** @var $repository tx_form_domain_repository_content */ $repository = t3lib_div::makeInstance('tx_form_domain_repository_content'); /** @var $view tx_form_view_wizard_wizard */ $view = t3lib_div::makeInstance('tx_form_view_wizard_wizard'); $view->setRepository($repository); $view->render(); } /** * The save action * * The action which should be taken when the form in the wizard is saved * * @return void */ protected function saveAction() { /** @var $repository tx_form_domain_repository_content */ $repository = t3lib_div::makeInstance('tx_form_domain_repository_content'); /** @var $view tx_form_view_wizard_save */ $view = t3lib_div::makeInstance('tx_form_view_wizard_save'); $view->setRepository($repository); $view->render(); } /** * The load action * * The action which should be taken when the form in the wizard is loaded * * @return void */ protected function loadAction() { /** @var $repository tx_form_domain_repository_content */ $repository = t3lib_div::makeInstance('tx_form_domain_repository_content'); /** @var $view tx_form_view_wizard_load */ $view = t3lib_div::makeInstance('tx_form_view_wizard_load'); $view->setRepository($repository); $view->render(); } } /** @var $wizard tx_form_controller_wizard */ $wizard = t3lib_div::makeInstance('tx_form_controller_wizard'); $wizard->dispatch(); ?>