Администратор Sonata - настраиваемые роли пунктов меню

как я могу настроить пользовательские роли для своих пользовательских маршрутов без администратора сонаты, но с помощью построителя меню администратора сонаты.

        sonata.admin.group.content:
            label:           test
            label_catalogue: test
            icon:            '<i class="fa fa-file-text"></i>'
            items:
                - route:        custom_route_1
                  label:        'custom_route_1'
                - route:        custom_route_2
                  label:        'custom_route_2'
                - route:        custom_route_3
                  label:        'custom_route_3'

Хочу настроить отдельные роли для каждого элемента меню.


person Evgeny Emmar    schedule 19.07.2016    source источник


Ответы (1)


вы должны добавить роли опций в свой код yml:

    sonata.admin.group.content:
        label:           test
        label_catalogue: test
        icon:            '<i class="fa fa-file-text"></i>'
        items:
            - route:        custom_route_1
              label:        'custom_route_1'
            - route:        custom_route_2
              label:        'custom_route_2'
            - route:        custom_route_3
              label:        'custom_route_3'
        Roles : [ROLE_X, ROLES_Y,.....]
person Salah Chtioui    schedule 13.10.2016