mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed GridField::getModelClass() not to access protected property.
This commit is contained in:
parent
3c1d62acfd
commit
c0d891cc0b
@ -123,7 +123,10 @@ class GridField extends FormField {
|
||||
*/
|
||||
public function getModelClass() {
|
||||
if ($this->modelClassName) return $this->modelClassName;
|
||||
if ($this->list && $this->list->dataClass) return $this->list->dataClass;
|
||||
if ($this->list && method_exists($this->list, 'dataClass')) {
|
||||
$class = $this->list->dataClass();
|
||||
if($class) return $class;
|
||||
}
|
||||
|
||||
throw new LogicException('GridField doesn\'t have a modelClassName, so it doesn\'t know the columns of this grid.');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user