public function getDisplayField()
    {
        if ($this->_displayField === null) {
            $primary = (array)$this->getPrimaryKey();
            $this->_displayField = array_shift($primary);

            $schema = $this->getSchema();
            if (!$schema) {
                throw new UnexpectedDriverException(__('No schema has been defined for this endpoint'));
            }
            if ($schema->column('title')) {
                $this->_displayField = 'title';
            }
            if ($schema->column('name')) {
                $this->_displayField = 'name';
            }
        }

        return $this->_displayField;
    }
public function getDisplayField()
    {
        if ($this->_displayField === null) {
            $primary = (array)$this->getPrimaryKey();
            $this->_displayField = array_shift($primary);

            $schema = $this->getSchema();
            if (!$schema) {
                throw new UnexpectedDriverException(__('No schema has been defined for this endpoint'));
            }
            if ($schema->column('title')) {
                $this->_displayField = 'title';
            }
            if ($schema->column('name')) {
                $this->_displayField = 'name';
            }
        }

        return $this->_displayField;
    }
public function getDisplayField ( ) { if ( $ this -> _displayField === null ) { $ primary = ( array ) $ this -> getPrimaryKey ( ) ; $ this -> _displayField = array_shift ( $ primary ) ; $ schema = $ this -> getSchema ( ) ; if ( ! $ schema ) { throw new UnexpectedDriverException ( __ ( 'No schema has been defined for this endpoint' ) ) ; } if ( $ schema -> column ( 'title' ) ) { $ this -> _displayField = 'title' ; } if ( $ schema -> column ( 'name' ) ) { $ this -> _displayField = 'name' ; } } return $ this -> _displayField ; }
Get the endpoints current display field

@return string
@throws \Muffin\Webservice\Exception\UnexpectedDriverException When no schema exists to fetch the key from
Get the endpoints current display field