Total Complexity | 7 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | class Checkbox extends FormElement |
||
8 | { |
||
9 | /** @var string */ |
||
10 | public $type = 'checkbox'; |
||
11 | |||
12 | /** @var bool */ |
||
13 | public $checked = false; |
||
14 | |||
15 | protected function attributesList() |
||
16 | { |
||
17 | return [ |
||
18 | 'id', 'name', 'type', 'value', 'class', 'checked', 'required', 'disabled', 'readonly', 'autocomplete', |
||
19 | ]; |
||
20 | } |
||
21 | |||
22 | protected function setSpecificAttributes() |
||
23 | { |
||
24 | $this->setChecked(); |
||
25 | $this->overwriteValue(); |
||
26 | } |
||
27 | |||
28 | protected function setChecked() |
||
32 | } |
||
33 | } |
||
34 | |||
35 | protected function overwriteValue() |
||
39 | } |
||
40 | |||
41 | protected function setStyles() |
||
52 |