I create a menu by KnpMenuBundle
class Builder extends ContainerAware
{
public function adminMenu(FactoryInterface $factory, array $options)
{
$menu = $factory->createItem('root');
$menu->addChild('Object', array(
'route' => 'object',
'uri' => '/object',
));
return $menu;
}
}
And when i am on page with url mypage.url/object, all is well - the li element in menu has a current class.
But when I go on the another url, e.g. mypage.url/object/new, then the li element in menu, with uri '/object' hasn't current class.
How can I do that element with uri: '/object', will have a current class and will be active, even the current page (route) is "under uri" /object. (e.g. mypage.url/object/new, mypager.url/object/12/delete, etc.)?