phpsymfonysonata-admin

How to custom export in SonataAdminBundle


I am trying to find a way to customize the export csv on my entity admin.

Ideally, I need to extract the data from the functions of my entity to put it in the csv file.

I list the fields I want to extract with the configureExportFields() function, and i tried to modify the request with the getDataSourceIterator() method but it seems to error the export.

If anyone know how to do this using the default sonata export

on PHP 8


Solution

  • I found this solution Sonata admin export fields with collection fields.