API CHANGE: Added $value argument as the first argument of a gridfield formattting callback.

This commit is contained in:
Sam Minnee 2012-05-30 11:46:32 +12:00
parent e19ab7aa5a
commit 948ca468f6

View File

@ -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);