From 948ca468f63d0ee3d0b9d8a934a54be322e4a93e Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 30 May 2012 11:46:32 +1200 Subject: [PATCH] API CHANGE: Added $value argument as the first argument of a gridfield formattting callback. --- forms/gridfield/GridFieldDataColumns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/gridfield/GridFieldDataColumns.php b/forms/gridfield/GridFieldDataColumns.php index d7c87f64f..fe858c07b 100644 --- a/forms/gridfield/GridFieldDataColumns.php +++ b/forms/gridfield/GridFieldDataColumns.php @@ -227,7 +227,7 @@ class GridFieldDataColumns implements GridField_ColumnProvider { $spec = $this->fieldFormatting[$fieldName]; if(is_callable($spec)) { - return $spec($item); + return $spec($value, $item); } else { $format = str_replace('$value', "__VAL__", $spec); $format = preg_replace('/\$([A-Za-z0-9-_]+)/', '$item->$1', $format);