Skip to content

Commit

Permalink
Deprecate group parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 11, 2024
1 parent 201ca2d commit eb55ce3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eb55ce3

Please sign in to comment.