Several AdminList Sonata

26 views Asked by At

There are several projects. An administration service was created using SonataAdmin for one of them. But it ended up expanding to the other two as well. Because of this, the left side menu became overloaded. I decided that it was necessary to separate the side menu for each project by creating separate lists. The problem is that I have absolutely no idea how to do this. The entire list of groups in sonata_admin.yaml is displayed and I can’t separate it somehow.

I tried through block, but the left menu always accepts all groups elements. After research, I realized that the Sonata\AdminBundle\Admin\Pool class is responsible for delivering groups from the yaml file. I thought I could create my own Pool class and set it in the settings, but its configuration turned out to be unnecessarily complex and, most likely, this is not a relevant solution. Another solution was to try separating the lists of each project by user role. Conventionally, if he goes through the root, which has a project prefix (.../project_1/..., .../project_2/..., .../project_3/...), then set the corresponding role (ROLE_PROJECT_1, ROLE_PROJECT_2, ROLE_PROJECT_3). But, again, it seems that this is a crutch. Actually, does anyone know the correct solution to this problem?

0

There are 0 answers