GridFieldExportButton
class GridFieldExportButton implements GridField_HTMLProvider, GridField_ActionProvider, GridField_URLHandler (View source)
Adds an "Export list" button to the bottom of a GridField.
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)
export 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.
getURLHandlers($gridField)
it is also a URL
handleExport($gridField, $request = null)
Handle the export, for both the action button and the URL
protected array
getExportColumnsForGridField(GridField $gridField)
Return the columns to export
string
generateExportFileData(GridField $gridField)
Generate export fields for CSV.
array
getExportColumns()
No description
setExportColumns($cols)
No description
string
getCsvSeparator()
No description
setCsvSeparator($separator)
No description
bool
getCsvHasHeader()
No description
setCsvHasHeader($bool)
No description