SilverStripe\GridfieldQueuedExport\Forms\GridFieldQueuedExportButton
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.
Synopsis
class GridFieldQueuedExportButton
implements
GridField_HTMLProvider,GridField_ActionProvider,GridField_URLHandler
{
- // members
- protected $exportColumns;
- protected string $csvSeparator = ",";
- protected boolean $csvHasHeader = true;
- protected $targetFragment;
- // methods
- public void __construct()
- public void getHTMLFragments()
- public array getActions()
- public void handleAction()
- public HTTPResponse startExport()
- public array getURLHandlers()
- protected void getExportPath()
- public HTTPResponse|DBHTMLText checkExport()
- public HTTPResponse downloadExport()
- public array getExportColumns()
- public $this setExportColumns()
- public string getCsvSeparator()
- public $this setCsvSeparator()
- public boolean getCsvHasHeader()
- public $this setCsvHasHeader()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Implements
- SilverStripe\Forms\GridField\GridField_HTMLProvider
- SilverStripe\Forms\GridField\GridField_ActionProvider
- SilverStripe\Forms\GridField\GridField_URLHandler
Members
protected
- $csvHasHeader — boolean
- $csvSeparator — string
- $exportColumns — array
-
$targetFragment
Fragment to write the button to
Methods
protected
public
- __construct()
- checkExport() — Handle the export, for both the action button and the URL
- downloadExport()
- getActions() — This class is an action button
- getCsvHasHeader()
- getCsvSeparator()
- getExportColumns()
- getHTMLFragments() — Place the export button in a <p> tag below the field
- getURLHandlers() — This class is also a URL handler
- handleAction()
- setCsvHasHeader()
- setCsvSeparator()
- setExportColumns()
- startExport()