diff --git a/catalyst/menu-bundle/Listener/MenuAnnotationListener.php b/catalyst/menu-bundle/Listener/MenuAnnotationListener.php index b6755e26..2ad6b04c 100644 --- a/catalyst/menu-bundle/Listener/MenuAnnotationListener.php +++ b/catalyst/menu-bundle/Listener/MenuAnnotationListener.php @@ -7,11 +7,10 @@ use ReflectionClass; use ReflectionException; use RuntimeException; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; -use Catalyst\MenuBundle\Annotation\Menu as MenuAnnotation; use Twig\Environment as TwigEnvironment; -// TODO: put the generator in our bundle -use App\Menu\Generator as MenuGenerator; +use Catalyst\MenuBundle\Annotation\Menu as MenuAnnotation; +use Catalyst\MenuBundle\Menu\Generator as MenuGenerator; class MenuAnnotationListener { diff --git a/config/services.yaml b/config/services.yaml index 487d8d13..2fc3301d 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -119,6 +119,12 @@ services: $config_dir: "%kernel.root_dir%/../config" $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: arguments: $menu_name: "main_menu"