| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | trait ManagesViewData |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Share data for the page being rendered. |
||
| 20 | */ |
||
| 21 | public function shareViewData(HydePage $page): void |
||
| 22 | { |
||
| 23 | Render::setPage($page); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the route key for the page being rendered. |
||
| 28 | */ |
||
| 29 | public function currentRouteKey(): ?string |
||
| 30 | { |
||
| 31 | return Render::getRouteKey(); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the route for the page being rendered. |
||
| 36 | */ |
||
| 37 | public function currentRoute(): ?Route |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the page being rendered. |
||
| 44 | */ |
||
| 45 | public function currentPage(): ?HydePage |
||
| 48 | } |
||
| 49 | } |
||
| 50 |