| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class DropdownNavItem extends NavItem |
||
| 17 | { |
||
| 18 | /** @var array<NavItem> */ |
||
| 19 | public array $items; |
||
| 20 | public string $name; |
||
| 21 | public string $href = ''; |
||
| 22 | |||
| 23 | /** @param array<NavItem> $items */ |
||
| 24 | public function __construct(string $name, array $items) |
||
| 25 | { |
||
| 26 | parent::__construct('', $name, 999); |
||
| 27 | $this->items = $items; |
||
| 28 | $this->name = $name; |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function fromArray(string $name, array $items): static |
||
| 32 | { |
||
| 33 | return new static($name, $items); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getItems(): Collection |
||
| 39 | } |
||
| 40 | } |
||
| 41 |