mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add Admin menu
This commit is contained in:
parent
2476d2f143
commit
f0676b99d0
@ -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() )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 }
|
Loading…
x
Reference in New Issue
Block a user