mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #58 from sheadawson/patch-1
FIX bug with LiteralField for column content
This commit is contained in:
commit
1a56a467fc
@ -138,8 +138,12 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
|||||||
if(isset($info['callback'])) {
|
if(isset($info['callback'])) {
|
||||||
$field = call_user_func($info['callback'], $record, $col, $grid);
|
$field = call_user_func($info['callback'], $record, $col, $grid);
|
||||||
} elseif(isset($info['field'])) {
|
} elseif(isset($info['field'])) {
|
||||||
|
if ($info['field'] == 'LiteralField') {
|
||||||
|
$field = new $info['field']($col, null);
|
||||||
|
}else{
|
||||||
$field = new $info['field']($col);
|
$field = new $info['field']($col);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!$field instanceof FormField) {
|
if(!$field instanceof FormField) {
|
||||||
throw new Exception(sprintf(
|
throw new Exception(sprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user