3 namespace dokuwiki\Form
;
8 * Just like an Element but it's value is not part of its attributes
10 * What the value is (tag name, content, etc) is defined by the actual implementations
12 * @package dokuwiki\Form
14 abstract class ValueElement
extends Element
17 * @var string holds the element's value
19 protected $value = '';
23 * @param string $value
24 * @param array $attributes
26 public function __construct($type, $value, $attributes = [])
28 parent
::__construct($type, $attributes);
33 * Get or set the element's value
35 * @param null|string $value
36 * @return string|$this
38 public function val($value = null)
40 if ($value !== null) {
41 $this->value
= $value;