Question

I have 2 Entities, Orders and OrderItems.

An order can have many items and this all works fine.

I'm looking at the SonataAdminBundle and I have setup the dashboard and the services for both of these Entites.

I have seen in the documentation, that when editing an entity, there are tabs that show/hide other sections. For example on the demo

Under the Pages when editing there is the default details and then 2 tabs Seo and Advanced

What I'd like to display is the following:

  1. Display the Order when editing
  2. Have a tab to display the collection of Order Items in a separate tab

I've looked all over, but can't find any docs to show ho to do this

EDIT:

It seems I can do this using

->with('Orders')
    ->('id)
->with('Items')
...........
Was it helpful?

Solution

you can try this...

 ->with('Orders')
   ->('id')
 ->end()
 ->with('Items')
   --------
 ->end()

OTHER TIPS

If you want it collapsed you should add this:

    ->with('Seo',  array('collapsed' => true))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top