Two Sonata Admin Panel Bundles in one Symfony application

273 Views Asked by At

Is it possible to have two Sonata Admin Panel Bundles in one Symfony application? How can I achieve this?

1

There are 1 best solutions below

1
On BEST ANSWER

As KondukterCRO mentioned, it is possible to have only one Sonata Admin installation per Symfony project.

However, if you need, you can have:

  • Two dashboards, for example have one native dashboard and for second dashboard - make a custom action + template
  • Two sets of entities with different access rights. Alhthough all Sonata Admin pages will have one comon prefix - you still can separate access rights to Sonata Admin pages with simple rules in security.yml >> access_control section, or more complex rules - in every admin class, in method ::isGranted()