简体   繁体   English

Sonata管理员捆绑包显示子表列表以及父表的“添加/编辑”屏幕

[英]Sonata Admin Bundle Show Child table list along with Add/Edit screen of parent table

I am working with Sonata admin bundle and Symfony2.3.3. 我正在使用Sonata管理员捆绑软件和Symfony2.3.​​3。 I have a parent table and a child table which has a foreign key linked. 我有一个父表和一个有外键链接的子表。 I have managed to create an 'Add new entry' button for the child table in the Parent admin's add/edit screen using the 'sonata_type_collection'. 我已经使用“ sonata_type_collection”在父级管理员的添加/编辑屏幕中为子表创建了“添加新条目”按钮。 I want to know if it is possible to show the child table list in the same add/edit screen of the parent admin. 我想知道是否可以在父管理员的同一添加/编辑屏幕中显示子表列表。 I googled much but couldn't find a proper answer. 我用Google搜索了很多,但是找不到正确的答案。 I would really appreciate it if you guys could help me. 如果你们能帮助我,我将非常感谢。 Thanks. 谢谢。

Try 尝试

 ->add('child', 'sonata_type_collection', array(), array(
                'edit' => 'inline',
                'inline' => 'table',
                'sortable' => 'position'
 ))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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