Skip to content

Commit

Permalink
Move navigation accessor to helper trait
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 8, 2024
1 parent ed6c6a7 commit 01b1ce1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Foundation\Concerns;

use Hyde\Foundation\HydeKernel;
use Hyde\Framework\Features\Navigation\NavigationMenu;

use function ltrim;
use function rtrim;
Expand Down Expand Up @@ -71,6 +72,13 @@ public function getMediaOutputDirectory(): string
return ltrim($this->getMediaDirectory(), '_');
}

public function navigation(): NavigationMenu
{
$this->needsToBeBooted();

return $this->navigation;
}

protected function normalizeSourcePath(string $outputDirectory): string
{
return $this->pathToRelative(rtrim($outputDirectory, '/\\'));
Expand Down
7 changes: 0 additions & 7 deletions packages/framework/src/Foundation/HydeKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,4 @@ public function toArray(): array
'routes' => $this->routes(),
];
}

public function navigation(): NavigationMenu
{
$this->needsToBeBooted();

return $this->navigation;
}
}

0 comments on commit 01b1ce1

Please sign in to comment.