| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class CheckBox extends FieldAbstract implements ArrayValueInterface |
||
| 12 | { |
||
| 13 | |||
| 14 | use CanRenderInlineTrait; |
||
| 15 | use HasOptionsTrait; |
||
| 16 | |||
| 17 | /* |
||
| 18 | * We end up ignoring this during rendering Checkboxes, see the renderer for info |
||
| 19 | */ |
||
| 20 | 8 | public function getTag(): string |
|
| 21 | { |
||
| 22 | 8 | return 'div'; |
|
| 23 | } |
||
| 24 | |||
| 25 | 12 | public function init(): void |
|
| 26 | { |
||
| 27 | 12 | $this->setValue([]); |
|
|
|
|||
| 28 | 12 | $this->setRenderInline(false); |
|
| 29 | 12 | $this->setRenderer(new CheckboxRender()); |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $key |
||
| 34 | */ |
||
| 35 | 2 | public function checkValue($key): void |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param $key |
||
| 44 | */ |
||
| 45 | 1 | public function uncheckValue($key): void |
|
| 55 | } |
||
| 56 | } |
||
| 57 | } |
||
| 58 |