mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Create a controller for rendering menu
This commit is contained in:
parent
39244251ce
commit
d190d5c371
21
Controller/MenuController.php
Normal file
21
Controller/MenuController.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace CL\Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class MenuController extends Controller
|
||||
{
|
||||
public function writeMenuAction($menu, $layout, $activeRouteKey, array $args = array() )
|
||||
{
|
||||
|
||||
|
||||
|
||||
return $this->render($layout, array(
|
||||
'menu_composer' => $this->get('cl_chill_main_menu_composer'),
|
||||
'menu' => $menu,
|
||||
'args' => $args,
|
||||
'activeRouteKey' => $activeRouteKey
|
||||
));
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ parameters:
|
||||
# cl_chill_main.example.class: CL\Chill\MainBundle\Example
|
||||
|
||||
services:
|
||||
menu_composer:
|
||||
cl_chill_main_menu_composer:
|
||||
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
||||
arguments:
|
||||
- "@router"
|
||||
|
Loading…
x
Reference in New Issue
Block a user