Skip to content

Commit

Permalink
Updated the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jul 24, 2024
1 parent c20310c commit dc5b9f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 14 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Upgrade between EasyAdmin 4.x versions
======================================

EasyAdmin 4.11.0
----------------

### Updated the `MenuItemMatcherInterface`

The `MenuItemMatcherInterface` has changed as follows:

* The `isSelected(MenuItemDto $menuItemDto)` has been removed
* The `isExpanded(MenuItemDto $menuItemDto)` method has been added
* A new `markSelectedMenuItem(array<MenuItemDto> $menuItems)` method has been added

Read the comments in the code of the `MenuItemMatcher` class to learn about the
new menu item matching logic.

EasyAdmin 4.10.0
----------------

Expand Down
10 changes: 3 additions & 7 deletions src/Contracts/Menu/MenuItemMatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
interface MenuItemMatcherInterface
{
/**
* @return bool Returns true when this menu item is the selected one
* @param MenuItemDto[] $menuItems
* @return MenuItemDto[]
*/
public function isSelected(MenuItemDto $menuItemDto): bool;

/**
* @return bool Returns true when any of the subitems of the menu item is selected
*/
public function isExpanded(MenuItemDto $menuItemDto): bool;
public function markSelectedMenuItem(array $menuItems): array;
}

0 comments on commit dc5b9f3

Please sign in to comment.