EasyAdmin 3.x отображает отношение «один ко многим» на странице сведенийPhp

Кемеровские программисты php общаются здесь
Anonymous
EasyAdmin 3.x отображает отношение «один ко многим» на странице сведений

Сообщение Anonymous »


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!


Источник: https://stackoverflow.com/questions/780 ... tails-page

Вернуться в «Php»