MINOR Fixed GridFieldExporter accessors (undefined $gridField in changed scope)

This commit is contained in:
Ingo Schommer 2012-01-30 17:29:35 +01:00
parent 5faca9ca2f
commit 008ecf750a

View File

@ -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;
}
/**