You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
574 B

  1. <?php
  2. namespace dokuwiki\Form;
  3. /**
  4. * Class Label
  5. * @package dokuwiki\Form
  6. */
  7. class LabelElement extends ValueElement
  8. {
  9. /**
  10. * Creates a new Label
  11. *
  12. * @param string $label This is is raw HTML and will not be escaped
  13. */
  14. public function __construct($label)
  15. {
  16. parent::__construct('label', $label);
  17. }
  18. /**
  19. * The HTML representation of this element
  20. *
  21. * @return string
  22. */
  23. public function toHTML()
  24. {
  25. return '<label ' . buildAttributes($this->attrs()) . '>' . $this->val() . '</label>';
  26. }
  27. }