简体   繁体   中英

In sonata admin how can we have multiple levels child admins

I have a need for multiple tiers of admins. The first parent -> child tier works great, but it seems that I'm not able to add a third.

For instance, my structure looks like:

Grandparent -> Parent -> Child

The parent "grandparent" admin with a child "parent" admin works great. But, when I try to add the third tier to the tab menu, I see:

An exception has been thrown during the rendering of a template ("unable to find the route sonata.admin.grandparent|sonata.admin.parent|sonata.admin.child.list ").

I'm not really familiar enough with the inner workings to figure this one out....any thoughts? Thanks!

config/services.yaml

App\Admin\ParentAdmin:
calls:
    - [addChild, ['@App\Admin\ChildAdmin', 'parent']]
App\Admin\GrandParentAdmin:
calls:
    - [addChild, ['@App\Admin\ParentAdmin', 'grandParent']]

Not sure if the above works but then you've GrandParent -> Parent -> Child. More information.

I hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM