Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Datalist extends FormElement |
||
13 | { |
||
14 | private $options; |
||
15 | private $listname; |
||
16 | public function __construct($label, array $options = [], $attributes) |
||
17 | { |
||
18 | parent::__construct($label, $attributes); |
||
19 | $this->listname = 'datalist-' . $this->Attributes()->get('id'); |
||
20 | $this->Attributes()->set('list', $this->listname); |
||
21 | $this->options = array_values($options); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | public function RenderHtml(): string |
||
38 | } |
||
39 | |||
41 |