add Admin menu

This commit is contained in:
Julien Fastré 2013-12-07 13:28:41 +01:00
parent 2476d2f143
commit f0676b99d0
3 changed files with 12 additions and 1 deletions

View File

@ -6,7 +6,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class MenuController extends Controller class MenuController extends Controller
{ {
public function writeMenuAction($menu, $layout, $activeRouteKey, array $args = array() ) public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = array() )
{ {

View File

@ -32,6 +32,13 @@ class MenuComposer {
if ($route->getOption('menu') === $menuId) { if ($route->getOption('menu') === $menuId) {
$a['route'] = $key; $a['route'] = $key;
$a['label'] = $route->getOption('label'); $a['label'] = $route->getOption('label');
if ($route->hasOption('helper')) {
$a['helper'] = $route->getOption('helper');
} else {
$a['helper'] = '';
}
$routes[$route->getOption('order')] = $a; $routes[$route->getOption('order')] = $a;
} }
} }

View File

@ -1,3 +1,7 @@
cl_chill_main_homepage: cl_chill_main_homepage:
pattern: /hello pattern: /hello
defaults: { _controller: CLChillMainBundle:Default:index } defaults: { _controller: CLChillMainBundle:Default:index }
chill_main_admin_central:
pattern: /admin
defaults: { _controller: CLChillMainBundle:Admin:index }