Add generator service from menu bundle #222
This commit is contained in:
parent
682bf7ede2
commit
915cb6ba8d
2 changed files with 8 additions and 3 deletions
|
|
@ -7,11 +7,10 @@ use ReflectionClass;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||||
use Catalyst\MenuBundle\Annotation\Menu as MenuAnnotation;
|
|
||||||
use Twig\Environment as TwigEnvironment;
|
use Twig\Environment as TwigEnvironment;
|
||||||
|
|
||||||
// TODO: put the generator in our bundle
|
use Catalyst\MenuBundle\Annotation\Menu as MenuAnnotation;
|
||||||
use App\Menu\Generator as MenuGenerator;
|
use Catalyst\MenuBundle\Menu\Generator as MenuGenerator;
|
||||||
|
|
||||||
class MenuAnnotationListener
|
class MenuAnnotationListener
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,12 @@ services:
|
||||||
$config_dir: "%kernel.root_dir%/../config"
|
$config_dir: "%kernel.root_dir%/../config"
|
||||||
$acl_file: "%api_acl_file%"
|
$acl_file: "%api_acl_file%"
|
||||||
|
|
||||||
|
Catalyst\MenuBundle\Menu\Generator:
|
||||||
|
arguments:
|
||||||
|
$router: "@router.default"
|
||||||
|
$cache_dir: "%kernel.cache_dir%"
|
||||||
|
$config_dir: "%kernel.root_dir%/../config"
|
||||||
|
|
||||||
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
Catalyst\MenuBundle\Listener\MenuAnnotationListener:
|
||||||
arguments:
|
arguments:
|
||||||
$menu_name: "main_menu"
|
$menu_name: "main_menu"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue