src/Resource/ContentType.php
public function getField(string $fieldId, bool $tryCaseInsensitive = false)
    {
        if (isset($this->fields[$fieldId])) {
            return $this->fields[$fieldId];
        }

        if ($tryCaseInsensitive) {
            foreach ($this->fields as $name => $field) {
                if (\mb_strtolower($name) === \mb_strtolower($fieldId)) {
                    return $field;
                }
            }
        }

        return null;
    }
public function getField(string $fieldId, bool $tryCaseInsensitive = false)
    {
        if (isset($this->fields[$fieldId])) {
            return $this->fields[$fieldId];
        }

        if ($tryCaseInsensitive) {
            foreach ($this->fields as $name => $field) {
                if (\mb_strtolower($name) === \mb_strtolower($fieldId)) {
                    return $field;
                }
            }
        }

        return null;
    }
Returns the field for the passed id.

If the field does not exist, null is returned.

@param string $fieldId
@param bool   $tryCaseInsensitive

@return Field|null