3 namespace dokuwiki\Form
;
8 * Represents a simple button
10 * @package dokuwiki\Form
12 class ButtonElement
extends Element
14 /** @var string HTML content */
15 protected $content = '';
19 * @param string $content HTML content of the button. You have to escape it yourself.
21 public function __construct($name, $content = '')
23 parent
::__construct('button', array('name' => $name, 'value' => 1));
24 $this->content
= $content;
28 * The HTML representation of this element
32 public function toHTML()
34 return '<button ' . buildAttributes($this->attrs(), true) . '>'.$this->content
.'</button>';