Skip to content

Commit b412f34

Browse files
committed
Update navigation group to extend menu class
1 parent 841d1bf commit b412f34

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/framework/src/Framework/Features/Navigation/NavigationGroup.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@
1414
/**
1515
* Abstraction for a grouped navigation menu item, like a dropdown or a sidebar group.
1616
*/
17-
class NavigationGroup
17+
class NavigationGroup extends NavigationMenu
1818
{
1919
protected string $label;
2020
protected int $priority;
2121

2222
public function __construct(string $label, array $items = [], int $priority = NavigationMenu::LAST)
2323
{
24-
$this->items = new Collection();
2524
$this->label = $label;
2625
$this->priority = $priority;
2726

28-
$this->add($items);
27+
parent::__construct($items);
2928
}
3029

3130
public static function create(string $label, array $items = [], int $priority = NavigationMenu::LAST): static

0 commit comments

Comments
 (0)