Search code examples
symfonysonatasymfony-2.8

Two Sonata Admin Panel Bundles in one Symfony application


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


Solution

  • 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()