I wrote the last days on my nav-bar-menu whit KnpMenuBundle. I want simply to give the template a few parameters on the way and then react on it. Is it possible? I tried this:
$menu->addChild('Registration', array('route' => 'fos_user_registration_register',
'icon' => array('glyphicon' => 'briefcase')));
And then I want to pick this in Twig template:
{% if icon['glyphicon'] is defined %}
<span class="glyphicon glyphicon-{{icon['glyphicon']}} "></span>
{% endif %}
I tried a lot, but nothing works. What can I try next?