简体   繁体   中英

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. 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'. 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. 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'
 ))

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