1 | <?php |
||
16 | class MenuSubsection extends MenuItem |
||
17 | { |
||
18 | /** @var bool $default Is this the default subaction - if not set for any will default to first... */ |
||
19 | protected $default = false; |
||
20 | |||
21 | /** @var string[] $active Set the button active for other subsections. */ |
||
22 | protected $active = []; |
||
23 | |||
24 | /** |
||
25 | * @param array $arr |
||
26 | * |
||
27 | * @return MenuSubsection |
||
28 | */ |
||
29 | 41 | protected function buildMoreFromArray(array $arr): MenuSubsection |
|
37 | |||
38 | /** |
||
39 | * @return boolean |
||
40 | */ |
||
41 | public function isDefault(): bool |
||
42 | { |
||
43 | return $this->default; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @param boolean $default |
||
48 | * |
||
49 | * @return MenuSubsection |
||
50 | */ |
||
51 | 41 | public function setDefault(bool $default): MenuSubsection |
|
57 | |||
58 | /** |
||
59 | * @return string[] |
||
60 | */ |
||
61 | public function getActive(): array |
||
62 | { |
||
63 | return $this->active; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @param string[] $active |
||
68 | * |
||
69 | * @return MenuSubsection |
||
70 | */ |
||
71 | 41 | public function setActive(array $active): MenuSubsection |
|
77 | } |
||
78 |