| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class DropdownNavItem extends NavItem |
||
| 18 | { |
||
| 19 | /** @var array<NavItem> */ |
||
| 20 | public array $items; |
||
| 21 | |||
| 22 | /** @param array<NavItem> $items */ |
||
| 23 | public function __construct(string $label, array $items, ?int $priority = null) |
||
| 24 | { |
||
| 25 | parent::__construct('', $label, $priority ?? $this->searchForDropdownPriorityInNavigationConfig($label) ?? 999); |
||
| 26 | $this->items = $items; |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function fromArray(string $name, array $items): static |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getItems(): Collection |
||
| 37 | } |
||
| 38 | |||
| 39 | private function searchForDropdownPriorityInNavigationConfig(string $groupKey): ?int |
||
| 46 | } |
||
| 47 | } |
||
| 48 |