[英]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
").呈现模板期间引发了异常(“找不到路由
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!
谢谢!
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. 不知道上面的方法是否有效,但是您有GrandParent-> Parent-> Child。 More information.
更多信息。
I hope it helps! 希望对您有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.