src/Resource/Entry.php
public function has(string $name, string $locale = null, bool $checkLinksAreResolved = true): bool
    {
        $field = $this->sys->getContentType()->getField($name, true);

        if (!$field) {
            return false;
        }

        if (!\array_key_exists($field->getId(), $this->fields)) {
            return false;
        }

        try {
            $result = $this->getUnresolvedField($field, $locale);
            if ($checkLinksAreResolved) {
                $this->resolveFieldLinks($result, $locale);
            }
        } catch (\Exception $exception) {
            return false;
        }

        return true;
    }
public function has(string $name, string $locale = null, bool $checkLinksAreResolved = true): bool
    {
        $field = $this->sys->getContentType()->getField($name, true);

        if (!$field) {
            return false;
        }

        if (!\array_key_exists($field->getId(), $this->fields)) {
            return false;
        }

        try {
            $result = $this->getUnresolvedField($field, $locale);
            if ($checkLinksAreResolved) {
                $this->resolveFieldLinks($result, $locale);
            }
        } catch (\Exception $exception) {
            return false;
        }

        return true;
    }
Checks whether the current entry has a field with a certain ID.

@param string      $name
@param string|null $locale
@param bool        $checkLinksAreResolved

@return bool