Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function generate(): static |
||
18 | { |
||
19 | Hyde::routes()->getRoutes(DocumentationPage::class)->each(function (Route $route) { |
||
20 | if (! $route->getSourceModel()->get('hidden', false)) { |
||
21 | $this->items->push(tap(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)), function (NavItem $item) { |
||
22 | $item->title = $item->route->getSourceModel()->get('label'); |
||
23 | })); |
||
24 | } |
||
25 | }); |
||
26 | |||
27 | return $this; |
||
28 | } |
||
59 |