| Total Complexity | 7 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class MenuResolver extends AbstractMenuResolver |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @param array<array-key, mixed> $context |
||
|
|
|||
| 15 | * @return MenuItemInterface[] |
||
| 16 | */ |
||
| 17 | public function get(string $name, array $context): array |
||
| 18 | { |
||
| 19 | $this->setSubnavItem($context); |
||
| 20 | |||
| 21 | $result = []; |
||
| 22 | |||
| 23 | foreach ($this->entries as $menu) { |
||
| 24 | if ($this->getHandle($menu) === $name) { |
||
| 25 | $result = $this->resolve($menu, $result); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | return $result; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param MenuItemInterface[] $result |
||
| 34 | * @return MenuItemInterface[] |
||
| 35 | */ |
||
| 36 | private function resolve(MenuInterface $menu, array $result): array |
||
| 51 | } |
||
| 52 | |||
| 53 | private function setCurrentStates(MenuItemInterface $item): void |
||
| 60 | } |
||
| 61 | } |
||
| 62 |