FIX bug with LiteralField for column content

This change allowed me to have a column with a CMSThumbnail in a LiteralField
This commit is contained in:
Shea Dawson 2014-06-02 14:46:01 +10:00
parent 45eb7954a6
commit 3f44a865a0

View File

@ -138,8 +138,12 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
if(isset($info['callback'])) {
$field = call_user_func($info['callback'], $record, $col, $grid);
} elseif(isset($info['field'])) {
if ($info['field'] == 'LiteralField') {
$field = new $info['field']($col, null);
}else{
$field = new $info['field']($col);
}
}
if(!$field instanceof FormField) {
throw new Exception(sprintf(