Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function createMainMenu() { |
||
24 | $menu = $this->factory->createItem('root'); |
||
25 | |||
26 | $menu->addChild('main', [ |
||
27 | 'navbar' => true |
||
28 | ]); |
||
29 | |||
30 | // TODO: Move me to a listener so I can be ordered/prioritised |
||
31 | $menu->addChild('search', [ |
||
32 | 'navbar' => true, |
||
33 | 'pull-right' => true |
||
34 | ])->setExtra('template', 'VivaitBootstrapBundle:Default:search.html.twig'); |
||
35 | |||
36 | $this->event_dispatcher->dispatch(ConfigureMenuEvent::CONFIGURE, new ConfigureMenuEvent($this->factory, $menu)); |
||
37 | |||
38 | |||
39 | return $menu; |
||
40 | } |
||
41 | } |
||
42 |