Source for file WForwardButton.class.php

Documentation is available at WForwardButton.class.php

  1. <?php
  2. /**
  3. * @since Jul 20, 2005
  4. * @package polyphony.wizard.components
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: WForwardButton.class.php,v 1.3 2007/09/19 14:04:51 adamfranco Exp $
  10. */
  11.  
  12. require_once(POLYPHONY."/main/library/Wizard/Components/WEventButton.class.php");
  13.  
  14. /**
  15. * This adds a "Back" button to the wizard and throws the appropriate event.
  16. *
  17. * @since Jul 20, 2005
  18. * @package polyphony.wizard.components
  19. *
  20. * @copyright Copyright &copy; 2005, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: WForwardButton.class.php,v 1.3 2007/09/19 14:04:51 adamfranco Exp $
  24. */
  25. class WForwardButton extends WEventButton {
  26. var $_stepContainer;
  27.  
  28. /**
  29. * Constructor
  30. * @param ref object $stepContainer A {@link WizardStepContainer} object.
  31. * @access public
  32. * @return void
  33. */
  34. function WForwardButton ($stepContainer) {
  35. $this->setLabel(_("Forward -->"));
  36. $this->_stepContainer =$stepContainer;
  37. }
  38.  
  39. /**
  40. * Tells the wizard component to update itself - this may include getting
  41. * form post data or validation - whatever this particular component wants to
  42. * do every pageload.
  43. * @param string $fieldName The field name to use when outputting form data or
  44. * similar parameters/information.
  45. * @access public
  46. * @return boolean - TRUE if everything is OK
  47. */
  48. function update ($fieldName) {
  49. parent::update($fieldName);
  50. $wizard =$this->getWizard();
  51. if ($this->getAllValues()) {
  52. // go forward!
  53. $this->_stepContainer->goForward();
  54. }
  55. }
  56. /**
  57. * Answers true if this component will be enabled.
  58. * @access public
  59. * @return boolean
  60. */
  61. function isEnabled () {
  62. return $this->_stepContainer->canGoForward();
  63. }
  64.  
  65. }
  66.  
  67. ?>

Documentation generated on Wed, 19 Sep 2007 10:27:59 -0400 by phpDocumentor 1.3.0RC3