private function getFieldType($fieldName, $documentDefinition)
    {
        foreach ($documentDefinition->fields as $fieldTypeDefinition) {
            if ($fieldTypeDefinition->slug === $fieldName) {
                return $fieldTypeDefinition->type;
            }
        }

        throw new \Exception('Unknown field type for field' . $fieldName . ' in document ' . $this->document->path);
    }
private function getFieldType($fieldName, $documentDefinition)
    {
        foreach ($documentDefinition->fields as $fieldTypeDefinition) {
            if ($fieldTypeDefinition->slug === $fieldName) {
                return $fieldTypeDefinition->type;
            }
        }

        throw new \Exception('Unknown field type for field' . $fieldName . ' in document ' . $this->document->path);
    }
private function getFieldType ( $ fieldName , $ documentDefinition ) { foreach ( $ documentDefinition -> fields as $ fieldTypeDefinition ) { if ( $ fieldTypeDefinition -> slug === $ fieldName ) { return $ fieldTypeDefinition -> type ; } } throw new \ Exception ( 'Unknown field type for field' . $ fieldName . ' in document ' . $ this -> document -> path ) ; }
Get the type for a field
@param $fieldName
@param $documentDefinition
@return mixed
@throws \Exception
Get the type for a field