April 2016
Intermediate to advanced
290 pages
5h 51m
English
Let's see how to create a bootstrap style menu. The menu feature of MopaBootstrapBundle is totally handled by KnpMenuBundle. Here are the required steps to create a menu:
Menu.Builder.php; the contents of this class should be as follows:<?php // mava/src/AppBundle/Menu/Builder.php namespace Mava\CoreBundle\Menu; use Knp\Menu\FactoryInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class Builder extends ContainerBuilder { public function topMenu(FactoryInterface $factory, array $options) { $menu = $factory->createItem('root'); $menu->setChildrenAttribute('class', 'nav navbar-top-links navbar-right'); $dropdown2 = $menu->addChild(' ...