label.php 936 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * HTML class for static data
  4. * @example $form->addElement('label', 'My label', 'Content');
  5. */
  6. /**
  7. * A pseudo-element used for adding raw HTML to form
  8. *
  9. * Intended for use with the default renderer only, template-based
  10. * ones may (and probably will) completely ignore this
  11. *
  12. * @category HTML
  13. * @package HTML_QuickForm
  14. * @author Alexey Borzov <avb@php.net>
  15. * @version Release: 3.2.11
  16. * @since 3.0
  17. * @deprecated Please use the templates rather than add raw HTML via this element
  18. */
  19. class HTML_QuickForm_label extends HTML_QuickForm_static
  20. {
  21. /**
  22. * Class constructor
  23. *
  24. * @param string $text raw HTML to add
  25. * @access public
  26. * @return void
  27. */
  28. public function __construct(
  29. $label = null,
  30. $text = null,
  31. $attributes = null
  32. ) {
  33. parent::__construct(null, $label, $text, $attributes);
  34. $this->_type = 'html';
  35. }
  36. }