Total Complexity | 6 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | abstract class AbstractChecklist extends AbstractFormField implements FormFieldInterface |
||
11 | { |
||
12 | use HasLabelsTrait; |
||
13 | use IsSelectionFieldTrait; |
||
14 | |||
15 | /** |
||
16 | * Associative array of item definitions with the value as the key |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $items = []; |
||
21 | |||
22 | /** |
||
23 | * @var string[] |
||
24 | */ |
||
25 | protected $value = []; |
||
26 | |||
27 | /** |
||
28 | * Get the value of items |
||
29 | * |
||
30 | * @return mixed |
||
31 | */ |
||
32 | public function getItems() |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Set the value of items |
||
39 | * |
||
40 | * @param mixed $items |
||
41 | * |
||
42 | * @return self |
||
43 | */ |
||
44 | public function setItems($items) |
||
45 | { |
||
46 | $this->items = $items; |
||
47 | |||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | */ |
||
54 | protected function getItemsToRender(): array |
||
55 | { |
||
56 | return $this->selectionProvider |
||
57 | ? $this->selectionProvider->getSelection() |
||
58 | : $this->items; |
||
59 | } |
||
60 | /** |
||
61 | * |
||
62 | */ |
||
63 | protected function isItemChecked(string $item): bool |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * |
||
70 | */ |
||
71 | protected function createItemLabel(array $values): Label |
||
74 | } |
||
75 | } |
||
76 |