Skip to content

Added a new sortOrder option to sort menu items when they are added t…#381

Open
B4rb4ross4 wants to merge 1 commit intoKnpLabs:masterfrom
B4rb4ross4:feature/add_sort_order_for_menu_items
Open

Added a new sortOrder option to sort menu items when they are added t…#381
B4rb4ross4 wants to merge 1 commit intoKnpLabs:masterfrom
B4rb4ross4:feature/add_sort_order_for_menu_items

Conversation

@B4rb4ross4
Copy link
Contributor

…o the menu.

Suggestion for #380

@B4rb4ross4
Copy link
Contributor Author

I haven't changed the extra methods. I could fix the type hints in this branch if you like or I could create a separate pr. Just wondering how that could ever be merge to master if the build is failing ;)

$menu->addChild('c2', ['sortOrder' => 4]);
$menu->addChild('c3', ['sortOrder' => 1]);
$menu->addChild('c4', ['sortOrder' => 3]);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line missing here?
$menu->reorderChildren();

Copy link
Collaborator

@garak garak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please address problems highlighted by phpstan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants