mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: Added $value argument as the first argument of a gridfield formattting callback.
This commit is contained in:
parent
e19ab7aa5a
commit
948ca468f6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user