mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed GridFieldExporter accessors (undefined $gridField in changed scope)
This commit is contained in:
parent
5faca9ca2f
commit
008ecf750a
@ -90,7 +90,7 @@ class GridFieldExporter implements GridField_HTMLProvider, GridField_ActionProvi
|
||||
*/
|
||||
function generateExportFileData($gridField) {
|
||||
$separator = $this->csvSeparator;
|
||||
$csvColumns = $this->getExportColumns();
|
||||
$csvColumns = ($this->exportColumns) ? $this->exportColumns : $gridField->getDisplayFields();
|
||||
$fileData = '';
|
||||
$columnData = array();
|
||||
$fieldItems = new ArrayList();
|
||||
@ -118,12 +118,10 @@ class GridFieldExporter implements GridField_HTMLProvider, GridField_ActionProvi
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns exported columns, defaults to {@link GridField->getDisplayFields()}.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function getExportColumns() {
|
||||
return ($this->exportColumns) ? $this->exportColumns : $gridField->getDisplayFields();
|
||||
return $this->exportColumns;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user