diff options
author | Guy Brand <gb@unistra.fr> | 2015-08-10 10:03:27 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2015-08-10 10:03:27 +0200 |
commit | 53a57d16b9c741bb44099fd93bf79efa06796341 (patch) | |
tree | 24a90a50afe9325926c8ebaa2ed90f9fa093e5b9 /inc/Form/Label.php | |
parent | cf6e6645c31a9f185cef3fb9452fb188882ede47 (diff) | |
parent | a060d9973e7c1d5051f2cc426937881826e4972e (diff) | |
download | rpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.gz rpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.bz2 |
Merge branch master into stable
Diffstat (limited to 'inc/Form/Label.php')
-rw-r--r-- | inc/Form/Label.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/inc/Form/Label.php b/inc/Form/Label.php new file mode 100644 index 000000000..8dcd7cd5f --- /dev/null +++ b/inc/Form/Label.php @@ -0,0 +1,27 @@ +<?php +namespace dokuwiki\Form; + +/** + * Class Label + * @package dokuwiki\Form + */ +class Label extends ValueElement { + + /** + * Creates a new Label + * + * @param string $label + */ + public function __construct($label) { + parent::__construct('label', $label); + } + + /** + * The HTML representation of this element + * + * @return string + */ + public function toHTML() { + return '<label ' . buildAttributes($this->attrs()) . '>' . hsc($this->val()) . '</label>'; + } +} |