Resolve "Menu annotation for controller" #1071

Merged
jankstudio merged 13 commits from 222-menu-annotation-for-controller into master 2019-06-08 07:24:18 +00:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 915cb6ba8d - Show all commits

View file

@ -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
{

View file

@ -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"