Merge pull request #4112 from dokuwiki/bot/autofix
[dokuwiki.git] / inc / Form / TagElement.php
blob0dbe136e23de9b7b5ae2f0e0a7b4c0b5cd76af4b
1 <?php
3 namespace dokuwiki\Form;
5 /**
6 * Class TagElement
8 * Creates a self closing HTML tag
10 * @package dokuwiki\Form
12 class TagElement extends ValueElement
14 /**
15 * @param string $tag
16 * @param array $attributes
18 public function __construct($tag, $attributes = [])
20 parent::__construct('tag', $tag, $attributes);
23 /**
24 * The HTML representation of this element
26 * @return string
28 public function toHTML()
30 return '<' . $this->val() . ' ' . buildAttributes($this->attrs()) . ' />';