Build section menu using knp menu builder

This commit is contained in:
2018-07-17 16:49:45 +02:00
parent 25d00877ae
commit 4f9626e65f
7 changed files with 147 additions and 15 deletions

View File

@@ -36,12 +36,6 @@ chill_main_homepage_without_locale:
chill_main_homepage:
path: /{_locale}/homepage
defaults: { _controller: ChillMainBundle:Default:index }
options:
menus:
section:
order: 10
label: Homepage
icons: [home]
chill_main_admin_central:

View File

@@ -1,12 +1,6 @@
chill_main_export_index:
path: /
defaults: { _controller: ChillMainBundle:Export:index }
options:
menus:
section:
order: 20
label: Export Menu
icons: [upload]
chill_main_export_new:
path: /new/{alias}

View File

@@ -2,3 +2,9 @@ services:
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
tags:
- { name: 'chill.menu_builder' }
Chill\MainBundle\Routing\MenuBuilder\SectionMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -14,4 +14,10 @@ services:
class: Chill\MainBundle\Security\UserProvider\UserProvider
arguments:
$em: '@Doctrine\ORM\EntityManagerInterface'
Chill\MainBundle\Security\Authorization\ChillExportVoter:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
tags:
- { name: security.voter }