From eb55ce31eb1b3b326be3c897c723d9e51e608471 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 11 Mar 2024 11:03:41 +0100 Subject: [PATCH] Deprecate group parameter --- .../src/Framework/Features/Navigation/DocumentationSidebar.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php b/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php index 853d84606cb..c2e83fd0f8e 100644 --- a/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php +++ b/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php @@ -7,6 +7,7 @@ use Hyde\Facades\Config; use Hyde\Pages\DocumentationPage; use Hyde\Support\Facades\Render; +use JetBrains\PhpStorm\Deprecated; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Str; @@ -69,7 +70,7 @@ public function hasGroups(): bool * * For index pages, this will also return true for the first group in the menu, unless the index page has a specific group set. */ - public function isGroupActive(string $group): bool + public function isGroupActive(#[Deprecated('We should be able to get all the needed data from the instance and render data')]string $group): bool { $groupMatchesCurrentPageGroup = Str::slug(Render::getPage()->navigationMenuGroup()) === $group; $currentPageIsIndexPageAndShouldBeActive = $this->isCurrentPageIndexPage() && $this->shouldIndexPageBeActive($group);