Installer/Field.php
public function fieldExists($fieldName, ContentType $contentType)
    {
        $fieldDefinition = $contentType->getFieldDefinition($fieldName);

        if (empty($fieldDefinition)) {
            return false;
        }

        return true;
    }
public function fieldExists($fieldName, ContentType $contentType)
    {
        $fieldDefinition = $contentType->getFieldDefinition($fieldName);

        if (empty($fieldDefinition)) {
            return false;
        }

        return true;
    }
public function fieldExists ( $ fieldName , ContentType $ contentType ) { $ fieldDefinition = $ contentType -> getFieldDefinition ( $ fieldName ) ; if ( empty ( $ fieldDefinition ) ) { return false ; } return true ; }
Checks if `metas` field exists in specified ContentType.

@param string $fieldName
@param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType

@return bool
Checks if metas field exists in specified ContentType .