public function getRelatedField()
    {
        $field = $this->toModel->getMeta()->getField($this->fieldName);
        if (!$field->concrete) {
            throw new FieldDoesNotExist(sprintf("No related field named '%s'", $this->fieldName));
        }

        return $field;
    }
public function getRelatedField()
    {
        $field = $this->toModel->getMeta()->getField($this->fieldName);
        if (!$field->concrete) {
            throw new FieldDoesNotExist(sprintf("No related field named '%s'", $this->fieldName));
        }

        return $field;
    }
public function getRelatedField ( ) { $ field = $ this -> toModel -> getMeta ( ) -> getField ( $ this -> fieldName ) ; if ( ! $ field -> concrete ) { throw new FieldDoesNotExist ( sprintf ( "No related field named '%s'" , $ this -> fieldName ) ) ; } return $ field ; }
Returns the Field in the 'toModel' object to which this relationship is tied.

@since  1.1.0

@return Field

@throws FieldDoesNotExist

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Returns the Field in the toModel object to which this relationship is tied .