label.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // {{{ constructor
  22. /**
  23. * Class constructor
  24. *
  25. * @param string $text raw HTML to add
  26. * @access public
  27. * @return void
  28. */
  29. public function __construct(
  30. $label = null,
  31. $text = null,
  32. $attributes = null
  33. ) {
  34. parent::__construct(null, $label, $text, $attributes);
  35. $this->_type = 'html';
  36. }
  37. /**
  38. * @return string
  39. */
  40. public function toHtml()
  41. {
  42. return parent::toHtml();
  43. }
  44. }