| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 8 | class Breadcrumbs |
||
| 9 | { |
||
| 10 | public static function getFor(string $flatreference) |
||
| 11 | { |
||
| 12 | return app(SiteStructure::class)->getForReference($flatreference); |
||
| 13 | } |
||
| 14 | |||
| 15 | public static function getForPage(Page $page) |
||
| 16 | { |
||
| 17 | return collect(static::getFor($page->flatreference()->get())->flatten()->all())->reject(function ($node) { |
||
| 18 | return !$node->online; |
||
| 19 | }); |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function getParentForPage(Page $page) |
||
| 31 | } |
||
| 32 | } |
||
| 33 |