Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENHANCEMENT GridFieldExportButton now supports dot syntax for column …

…sources through DataObject::relField()
  • Loading branch information...
commit 4bcd44aee6f09f4efd0ad6de9aa37466e96d3894 1 parent 92b6adf
@halkyon halkyon authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 forms/gridfield/GridFieldExportButton.php
View
4 forms/gridfield/GridFieldExportButton.php
@@ -113,7 +113,7 @@ function generateExportFileData($gridField) {
foreach($items as $item) {
$columnData = array();
foreach($csvColumns as $columnSource => $columnHeader) {
- $value = $item->$columnSource;
+ $value = $item->relField($columnSource);
$value = str_replace(array("\r", "\n"), "\n", $value);
$columnData[] = '"' . str_replace('"', '\"', $value) . '"';
}
@@ -172,4 +172,4 @@ function setCsvHasHeader($bool) {
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.