2016-07-19 9 views
0

ソナタ管理なしで私のカスタムルートにカスタムロールを設定する方法はありますが、ソナタ管理メニュービルダーを使用します。Sonata admin - カスタムメニューアイテムのロール

 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' 

私はメニューの各要素に別々の役割を設定します。

答えて

0

あなた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,.....] 
関連する問題