EasyAdmin 3.x display OneToMany realtion on details page

71 Views Asked by At

on easyadmin 3.4 and symfony 5.4 I have the following 2 entities: Event, Participant, where an Event can have many participants.

I created a details page for the events on the controller's configureActions() method using $actions->add(Crud::PAGE_INDEX, Action::DETAIL). What i want to achieve is displaying the list of participants on the event details page, as they are displayed on the participants index page (paginated table, having a search button, etc). I would prefer doing it without creating custom templates and only by configurations/what the framework provides, as long as it is possible.

What i tried by now is using the CollectionField and AssociationField on the configureFields() method, but i only managed to display the participants separated via coma (by overriding the __toString() method) and I also tried playing around with the actions on the configureActions() method.

Thank you in advance for any possible solution!

0

There are 0 best solutions below