Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics

Export data

Is there a way to hook the exported data and export them to a new format like xls or PDF via custom code ?
I would like to manipulate the data before expoeting them.

Thanks !

5 years, 7 months ago
Stefan van den Dungen Gronovius

At this moment there is not a hook available for this.
You can alter the value of columns with the following hook though:

It’s also possible to misuse the filter ac/export/exporter_csv/delimiter for your solution as it contains the object that has both the data and the headers. Please notice that this filter is not meant for changing the export format, but you can use it to do some custom stuff with the data, I guess.

 * @param string $delimiter
 * @param \ACP\Export\Exporter\CSV $csv
function acp_export_to_another_format( $delimiter , $csv ){
	$header = $csv->get_column_labels();
	$data = $csv->get_data();
add_filter( 'ac/export/exporter_csv/delimiter', 'acp_export_to_another_format', 10, 2  );
5 years, 7 months ago

Thanks for your answer.

In this filter i can manage my data as i want, nice !
Do you think there is a way for me to create an ACP addon to change the export format or do you think it’s possible to add an action or a filter to do this in a future release ?

Thanks !

5 years, 7 months ago
Stefan van den Dungen Gronovius

You’re welcome.
I think the best approach would be some changes in our code that allows you to extend the Export behavior.
But I want to have our architect to have a look at this.
I created a ticket for this on our issue board on Github.

5 years, 7 months ago

You must be logged in to reply to this topic.