I'm coding a Symfony2 project. I'm using KnpMenuBundle and Twitter Bootstrap 3. What's wrong is KnpMenuBundle doesn't generate the good classes for my menu. I got class="current" instead of class="active".
I look for what to do and here is what I've already done:
- I copied TwigRender from KnpMenu into a Renderer directory and I changed currentClass attributes in the construct method.
- I had my menu builder and my custom renderer to be services.
- I tried to rendered it.
But I get this exeption
An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Argument 1 passed to Acme\MenuBundle\Renderer\CustomRenderer::__construct() must be an instance of Twig_Environment, string given, called in /var/www/project1/app/cache/dev/appDevDebugProjectContainer.php on line 1337 and defined in /var/www/project1/src/Acme/MenuBundle/Renderer/CustomRenderer.php line 24") in "AcmeHelloBundle:Default:index.html.twig".
I wish you'll be able to help me.
Chronic.
PS: excuse-me for the way I speak but I'm not a English native speaker ;)