diff options
author | Guy Brand <gb@unistra.fr> | 2015-08-23 15:54:03 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2015-08-23 15:54:03 +0200 |
commit | d1c5a21205ecdf83c4cbdcd9245556121688e798 (patch) | |
tree | f99aacf8e4e2aad00b106d9b905a14c3536ba935 /inc/Form/LabelElement.php | |
parent | 2beabe635c6b98fcf412ba42d137a5de33543109 (diff) | |
parent | 0f0d29909c63f9897c9c003e6d3e3b8381a6f36d (diff) | |
download | rpg-d1c5a21205ecdf83c4cbdcd9245556121688e798.tar.gz rpg-d1c5a21205ecdf83c4cbdcd9245556121688e798.tar.bz2 |
Merge branch 'master' into stable
Diffstat (limited to 'inc/Form/LabelElement.php')
-rw-r--r-- | inc/Form/LabelElement.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/inc/Form/LabelElement.php b/inc/Form/LabelElement.php new file mode 100644 index 000000000..9c8d54277 --- /dev/null +++ b/inc/Form/LabelElement.php @@ -0,0 +1,27 @@ +<?php +namespace dokuwiki\Form; + +/** + * Class Label + * @package dokuwiki\Form + */ +class LabelElement extends ValueElement { + + /** + * Creates a new Label + * + * @param string $label This is is raw HTML and will not be escaped + */ + public function __construct($label) { + parent::__construct('label', $label); + } + + /** + * The HTML representation of this element + * + * @return string + */ + public function toHTML() { + return '<label ' . buildAttributes($this->attrs()) . '>' . $this->val() . '</label>'; + } +} |