phpDocumentor form
[ class tree: form ] [ index: form ] [ all elements ]

Source for file SubmitButton.php

Documentation is available at SubmitButton.php

  1. <?
  2. /**
  3. * @package form
  4. * @filesource
  5. * @see HTML_FORM_COMPONENT_PATH.'/SubmitButton.php'
  6. * @copyright (c) http://Finn-Rasmussen.com
  7. * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
  8. * @author http://Finn-Rasmussen.com
  9. * @version 1.9
  10. * @since 21-oct-2005
  11. */
  12.  
  13. /**
  14. * The required files
  15. */
  16. require_once(HTML_FORM_COMPONENT_PATH.'/Input.php');
  17.  
  18. /**
  19. * Generates an INPUT element for a form, as a Submit Button
  20. * <code>
  21. * <input type="submit" name="$name" value="$value" class="$class"
  22. * title="$title" tabindex="" />
  23. * Usage:
  24. * $button = new SubmitButton($name,$value,$class,$onclick,$title,$tabindex);
  25. * print $button->getHtml();
  26. * Or
  27. * SubmitButton::display($name,$value,$class,$onclick,$title,$tabindex);
  28. * </code>
  29. * @package form
  30. */
  31.  
  32. class SubmitButton extends Input {
  33. /**
  34. * Constructor
  35. * @param String $name The name
  36. * @param String $value The value, if any
  37. * @param String $class The class
  38. * @param String $onclick On click event for javascript
  39. * @param String $title The tooltip
  40. * @param String $tabindex The tabindex
  41. */
  42. function SubmitButton($name='',$value='',$class='',$onclick='',$title='',$tabindex='') {
  43. $class = $class!=''?$class:CSS_BUTTON_SUBMIT_CLASS;
  44. $value = $value!=''?$value:BUTTON_SUBMIT_TEXT;
  45. $this->Input('submit',$name,$value,$class,'','','','',$onclick,$title,$tabindex);
  46. }
  47.  
  48. /**
  49. * Display html
  50. * <code>
  51. * Usage:
  52. * SubmitButton::display($name,$value,$class,$onclick,$title,$tabindex);
  53. * </code>
  54. * @static
  55. * @param String $name The name
  56. * @param String $value The value, if any
  57. * @param String $class The class
  58. * @param String $onclick On click event for javascript
  59. * @param String $title The tooltip
  60. * @param String $tabindex The tabindex
  61. */
  62. function display($name='',$value='',$class='',$onclick='',$title='',$tabindex='') {
  63. $html = new SubmitButton($name,$value,$class,$onclick,$title,$tabindex);
  64. $html->addHtml();
  65. }
  66. }
  67. ?>

Documentation generated on Thu, 22 Dec 2005 17:19:05 +0100 by phpDocumentor 1.3.0RC3