| Total Complexity | 9 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class DocumentationSidebar extends NavigationMenu |
||
| 15 | { |
||
| 16 | /** @return $this */ |
||
| 17 | public function generate(): static |
||
| 28 | } |
||
| 29 | |||
| 30 | public function hasGroups(): bool |
||
| 31 | { |
||
| 32 | return count($this->getGroups()) >= 1 && $this->getGroups() !== [0 => 'other']; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getGroups(): array |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getItemsInGroup(?string $group): Collection |
||
| 43 | { |
||
| 44 | return $this->items->filter(function ($item) use ($group) { |
||
| 45 | return $item->getGroup() === $group || $item->getGroup() === Str::slug($group); |
||
| 46 | })->sortBy('priority')->values(); |
||
| 47 | } |
||
| 48 | |||
| 49 | protected function filterHiddenItems(): Collection |
||
| 52 | } |
||
| 53 | |||
| 54 | protected function getPriorityForRoute(Route $route): int |
||
| 59 |