iliain/silverstripe-queuedexport

Provides a GridField button to queue the export to a CSV, good for handling large datasets

Installs: 183

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

1.1.1 2022-08-16 05:33 UTC

This package is auto-updated.

Last update: 2024-03-28 03:20:04 UTC


README

Provides a button that will queue the export to a csv file from a gridfield, which can then be found in the site Assets. Good for exporting large numbers of dataobjects without causing timeouts.

Installation (with composer)

composer require iliain/silverstripe-queuedexport

Usage

$config->addComponent(new GridFieldQueueExportButton('buttons-before-left')

The following config can be used to alter the behaviour of the export:

---
Name: myexportconfig
---
Iliain\QueuedExport\Jobs\CSVExportJob:
  storage_directory: 'CSV Exports' # Set the parent folder location where CSV files will be exported to
  increase_memory_limit: true # Enable or disable the environment increasing the time and memory limits for the export process. Default: true

A number of extension hooks have been provided to allow further modification of the process if required.