Source for file WSaveContinueButton.class.php

Documentation is available at WSaveContinueButton.class.php

  1. <?php
  2. /**
  3. * @since 5/31/06
  4. * @package polyphony.wizard
  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: WSaveContinueButton.class.php,v 1.8 2007/09/19 14:04:51 adamfranco Exp $
  10. */
  11.  
  12. /**
  13. * a button that persists data changes
  14. *
  15. * @since 5/31/06
  16. * @package polyphony.wizard
  17. *
  18. * @copyright Copyright &copy; 2005, Middlebury College
  19. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  20. *
  21. * @version $Id: WSaveContinueButton.class.php,v 1.8 2007/09/19 14:04:51 adamfranco Exp $
  22. */
  23. require_once(POLYPHONY."/main/library/Wizard/Components/WEventButton.class.php");
  24.  
  25. class WSaveContinueButton extends WEventButton {
  26. var $_stepContainer;
  27. /**
  28. * constructor
  29. *
  30. * @return void
  31. * @access public
  32. * @since 5/31/06
  33. */
  34. function WSaveContinueButton ($stepContainer) {
  35. $this->setEventAndLabel("edu.middlebury.polyphony.wizard.save",'Save Changes and Continue');
  36. $this->_stepContainer =$stepContainer;
  37. }
  38. /**
  39. * Tells the wizard component to update itself - this may include getting
  40. * form post data or validation - whatever this particular component wants to
  41. * do every pageload.
  42. * @param string $fieldName The field name to use when outputting form data or
  43. * similar parameters/information.
  44. * @access public
  45. * @return boolean - TRUE if everything is OK
  46. */
  47. function update ($fieldName) {
  48. parent::update($fieldName);
  49. if ($this->getAllValues()) {
  50. $this->_stepContainer->nextStep();
  51. }
  52. }
  53. /**
  54. * Answers true if this component will be enabled.
  55. * @access public
  56. * @return boolean
  57. */
  58. function isEnabled () {
  59. return $this->_stepContainer->hasNext();
  60. }
  61. }
  62.  
  63. ?>

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