Checks if $contentType is an existing User content.

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

@return bool

@throws \EzSystems\EzPlatformAdminUi\Exception\InvalidArgumentException
502459
public function isSatisfiedBy($contentType): bool
    {
        if (!$contentType instanceof ContentType) {
            throw new InvalidArgumentException('$contentType', sprintf('Must be instance of %s', ContentType::class));
        }

        if (in_array($contentType->identifier, $this->userContentTypeIdentifier, true)) {
            return true;
        }

        foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {
            if ($fieldDefinition->fieldTypeIdentifier === self::EZUSER_FIELD_TYPE_IDENTIFIER) {
                return true;
            }
        }

        return false;
    }
1092949
public function parse($contentType)
    {
        if (!$this->currentMethod)
            throw new NoActiveMethodException;

        $this->options[$this->currentMethod][] = $contentType;
        return $this;
    }
621070
protected function setHeaderNoCache($contentType = 'application/json')
    {
        header("Content-Type: " . $contentType . "; charset=utf-8");
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
        header("Cache-Control: no-store, no-cache, must-revalidate");
        header("Cache-Control: post-check=0, pre-check=0", false);
        header("Pragma: no-cache");
    }
90473
public function setContentType($contentType)
    {
        $this->contentType = $contentType;

        $this->setHeader('Content-Type', $contentType . '; charset=' . $this->getCharset());

        return $this;
    }
51126
public function loadFromContentType(ContentType $contentType): self
    {
        $languages = [];
        foreach ($contentType->languageCodes as $languageCode) {
            $languages[] = $this->languageService->loadLanguage($languageCode);
        }

        $this->data = array_map(
            function (Language $language) use ($contentType) {
                return $this->valueFactory->createLanguageFromContentType($language, $contentType);
            },
            $languages
        );

        return $this;
    }
767841
public void setContentType(String contentType) throws InvalidArgumentException {
    if (Strings.isNullOrEmpty(contentType)) {
      throw new InvalidArgumentException("empty content type");
    }

    this.contentType = contentType;
  }
1332753
public function countChangeLogByContentType($contentType, array $options)
    {
        $query = $this->countChangeLogByContentTypeQuery($contentType, $options);

        return $this->getCount($query->execute()->fetch());
    }
20030
private function checkRoleContentTypePermission($roleName, $permissionName, $contenttype)
    {
        // Actions on non-existing contenttypes are not allowed.
        if (!$this->app['storage.metadata']->createContentType($contenttype)) {
            return false;
        }

        $roles = $this->getRolesByContentTypePermission($permissionName, $contenttype);

        return in_array($roleName, $roles);
    }
942447
public static function create($content = null, $contentType = 'text/plain')
    {
        $instance = new static();

        $instance->content = $content;
        $instance->contentType = $contentType;

        return $instance;
    }
334642
public function isAsset(Content $content): bool
    {
        if ($this->contentTypeId === null) {
            $contentType = $this->contentTypeService->loadContentTypeByIdentifier(
                $this->mappings['content_type_identifier']
            );

            $this->contentTypeId = $contentType->id;
        }

        return $content->contentInfo->contentTypeId === $this->contentTypeId;
    }
90441
public function hasFieldType(ContentType $contentType, string $fieldTypeIdentifier): bool
    {
        foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {
            if ($fieldDefinition->fieldTypeIdentifier === $fieldTypeIdentifier) {
                return true;
            }
        }

        return false;
    }
914338
public static function setContentType($contentType, $encoding = null) {
		$value = $contentType;
		if (isset ( $encoding ))
			$value .= ' ;charset=' . $encoding;
		self::header ( 'Content-Type', $value );
	}
1151905
public function contentType($contentType = null) {
			if ($contentType != null) {
				$this->_contentType = $contentType;
				return true;
			}
			else {
				return $this->_contentType;
			}
		}
122811
public function transform($contentType, array $params = array())
    {
        if (!$contentType instanceof ContentTypeInterface) {
            throw new TransformerParameterTypeException();
        }

        $facade = $this->newFacade();

        $facade->id = $contentType->getId();
        $facade->contentTypeId = $contentType->getContentTypeId();
        $facade->name = $this->multiLanguagesChoiceManager->choose($contentType->getNames());
        $facade->version = $contentType->getVersion();
        $facade->linkedToSite = $contentType->isLinkedToSite();
        $facade->definingVersionable = $contentType->isDefiningVersionable();
        $facade->definingStatusable = $contentType->isDefiningStatusable();
        $facade->defaultListable = $contentType->getDefaultListable();

        if ($this->hasGroup(CMSGroupContext::AUTHORIZATIONS)) {

            $facade->addRight('can_delete', $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $contentType) &&
                $this->businessRulesManager->isGranted(BusinessActionInterface::DELETE, $contentType));

            $facade->addRight('can_duplicate', $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, ContentTypeInterface::ENTITY_TYPE));

            $facade->addRight(
                'can_create',
                $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, ContentTypeInterface::ENTITY_TYPE)
            );

            $content = $this->contentManager->initializeNewContent(
                $contentType->getContentTypeId(),
                '',
                $contentType->isLinkedToSite() && $contentType->isAlwaysShared(),
                $contentType->isDefiningStatusable()
            );
            $facade->addRight(
                'can_create_content',
                $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, $content)
            );

        }

        if ($this->hasGroup(CMSGroupContext::FIELD_TYPES)) {
            foreach ($contentType->getFields() as $field) {
                $facade->addField($this->getContext()->transform('field_type', $field));
            }
        }

        return $facade;
    }
988342
public function contentType(string $contentType): HttpRequest
    {
        $contentType = trim($contentType);

        // If this is a multipart request and boundary was not defined, we define a boundary as this is required for multipart requests:
        if (stripos($contentType, "multipart/") !== false) {
            if (stripos($contentType, "boundary") === false) {
                $contentType .= "; boundary=\"" . uniqid(time()) . "\"";
                $contentType = preg_replace('/(.)(;{2,})/', '$1;', $contentType); // remove double semi-colon, except after scheme
            }
        }

        return $this->header("Content-Type", $contentType);
    }
1289585
public function getConfig($contentType)
    {
        if (array_key_exists($contentType, $this->searchableTypes)) {
            return $this->searchableTypes[$contentType];
        }

        if ($this->canSearchInvisible() && array_key_exists($contentType, $this->invisibleTypes)) {
            return $this->invisibleTypes[$contentType];
        }

        return false;
    }
401394
protected function getLanguageCode(ContentType $contentType)
    {
        $contentTypeLanguages = array_keys($contentType->getNames());

        foreach ($this->languages as $languageCode) {
            if (in_array($languageCode, $contentTypeLanguages, true)) {
                return $languageCode;
            }
        }

        return $contentType->mainLanguageCode;
    }