src/Forms/GridField/GridField.php
public function getModelClass()
    {
        if ($this->modelClassName) {
            return $this->modelClassName;
        }

        /** @var DataList|ArrayList $list */
        $list = $this->list;
        if ($list && $list->hasMethod('dataClass')) {
            $class = $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.'
        );
    }
public function getModelClass()
    {
        if ($this->modelClassName) {
            return $this->modelClassName;
        }

        /** @var DataList|ArrayList $list */
        $list = $this->list;
        if ($list && $list->hasMethod('dataClass')) {
            $class = $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.'
        );
    }
public function getModelClass ( ) { if ( $ this -> modelClassName ) { return $ this -> modelClassName ; } /** @var DataList|ArrayList $list */ $ list = $ this -> list ; if ( $ list && $ list -> hasMethod ( 'dataClass' ) ) { $ class = $ 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.' ) ; }
Returns a data class that is a DataObject type that this GridField should look like.

@return string

@throws LogicException
Returns a data class that is a DataObject type that this GridField should look like .