HTML_QuickForm_Wizard
[ class tree: HTML_QuickForm_Wizard ] [ index: HTML_QuickForm_Wizard ] [ all elements ]

Source for file submit.php

Documentation is available at submit.php

  1. <?php
  2. /* vim: set number autoindent tabstop=2 shiftwidth=2 softtabstop=2: */
  3.  
  4. /**
  5. * Next action
  6. *
  7. * PHP versions 4 and 5
  8. *
  9. * LICENSE: This source file is subject to version 3.0 of the PHP license
  10. * that is available through the world-wide-web at the following URI:
  11. * http://www.php.net/license/3_0.txt. If you did not receive a copy of
  12. * the PHP License and are unable to obtain it through the web, please
  13. * send a note to license@php.net so we can mail you a copy immediately.
  14. *
  15. * @category HTML
  16. * @package HTML_QuickForm_Wizard
  17. * @author Fabio Ambrosanio <fabio@ambrosanio.com>
  18. * @license http://www.php.net/license/3_01.txt PHP
  19. * @version @package_version@
  20. *
  21. * $Id: submit.php,v 1.1 2007/02/18 18:36:11 fabamb Exp $
  22. */
  23.  
  24. require_once 'HTML/QuickForm/Action/Next.php';
  25.  
  26. /**
  27. * This class implements "submit" action that is to validate and save form's data and stay at the current pages
  28. *
  29. */
  30. class HTML_QuickForm_Wizard_submit extends HTML_QuickForm_Action_Next
  31. {
  32. function perform(&$page, $actionName)
  33. {
  34. // save the form values and validation status to the session
  35. $page->isFormBuilt() or $page->buildForm();
  36. $pageName = $page->getAttribute('id');
  37. $data =& $page->controller->container();
  38. $data['values'][$pageName] = $page->exportValues();
  39. if (PEAR::isError($valid = $page->validate())) {
  40. return $valid;
  41. }
  42. $data['valid'][$pageName] = $valid;
  43.  
  44. return $page->handle('display');
  45. }
  46. }
  47. ?>

Documentation generated on Thu, 19 Apr 2007 08:13:26 +0200 by phpDocumentor 1.3.0RC3