GridFieldQueuedExportButton
class GridFieldQueuedExportButton implements GridField_HTMLProvider, GridField_ActionProvider, GridField_URLHandler (View source)
A button you can add to a GridField to export that GridField as a CSV. Should work with any sized GridField, as the export is done using a queuedjob in the background.
Properties
protected | array | $exportColumns | ||
protected | string | $csvSeparator | ||
protected | bool | $csvHasHeader | ||
protected | $targetFragment | Fragment to write the button to |
Methods
Handle an action on the given GridField.
Handle the export, for both the action button and the URL
Details
__construct(string $targetFragment = "after", array $exportColumns = null)
No description
array
getHTMLFragments($gridField)
Place the export button in a
tag below the field
array
getActions($gridField)
This class is an action button
handleAction(GridField $gridField, $actionName, $arguments, $data)
Handle an action on the given GridField.
Calls ALL components for every action handled, so the component needs to ensure it only accepts actions it is actually supposed to handle.
startExport($gridField)
No description
getURLHandlers($gridField)
This class is also a URL handler
protected
getExportPath($id)
No description
checkExport($gridField, $request = null)
Handle the export, for both the action button and the URL
downloadExport($gridField, $request = null)
No description
array
getExportColumns()
No description
setExportColumns($cols)
No description
string
getCsvSeparator()
No description
setCsvSeparator($separator)
No description
bool
getCsvHasHeader()
No description
setCsvHasHeader($bool)
No description