I'm trying generate breadcrumbs as per the recent (2.2) update but am having a problem getting the correct current item via:
knp_menu_get_current_item()
After a bunch of digging I found a conflict with a Voter that's been included from SonataAdmin
Sonata\AdminBundle\Menu\Matcher\Voter\ChildrenVote
This is returning true for each ancestor element in the tree so the root node is being returned as current
and as such the breadcrumb isn't being generated properly. Removing the ChildrenVote
voter makes my breadcrumbs spiffing.
Is there a way to restrict the Voters to specific Menus or can I explicitly define which Voters to use for a given Menu?
Installed versions:
sonata/admin-bundle: 3.10.2
knplabs/knp-menu: 2.2.0