@param string $contentType

@return array
774901
protected function parseContentType($contentType) {
        $parts = explode(';', $contentType);

        foreach ($parts as $key => $value) {
            $parts[$key] = trim($value);
        }

        return $parts;
    }
246618
public function getContentIdsByContentTypeId($contentTypeId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query
            ->select($this->dbHandler->quoteColumn('id'))
            ->from($this->dbHandler->quoteTable('ezcontentobject'))
            ->where(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('contentclass_id'),
                    $query->bindValue($contentTypeId, null, PDO::PARAM_INT)
                )
            );

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(PDO::FETCH_COLUMN);
    }
432428
public function decode($content, $contentType)
    {
        $converter = $this->getConverter($contentType);

        return $converter->decode($content);
    }
244635
protected function getConverter($contentType)
    {
        if (!isset($this->supportedMediaTypes[$contentType])) {
            throw new Exception("No converter found for content type '$contentType'");
        }

        $converterClass = $this->supportedMediaTypes[$contentType];

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

        $this->options[$this->currentMethod][] = $contentType;
        return $this;
    }
861399
public function createMapping($contentType)
    {
        $index = $this->client->getIndex($this->indexName);
        $type = $index->getType(self::INDEX_TYPE . $contentType->getContentTypeId());

        $mappingProperties = array(
            'id' => array('type' => 'string', 'include_in_all' => true),
            'elementId' => array('type' => 'string', 'include_in_all' => true),
            'contentId' => array('type' => 'string', 'include_in_all' => true),
            'name' => array('type' => 'string', 'include_in_all' => true),
            'siteId' => array('type' => 'string', 'include_in_all' => true),
            'linkedToSite' => array('type' => 'boolean', 'include_in_all' => false),
            'language' => array('type' => 'string', 'include_in_all' => true),
            'contentType' => array('type' => 'string', 'include_in_all' => true),
            'keywords' => array('type' => 'string', 'include_in_all' => true),
            'updatedAt' => array('type' => 'long', 'include_in_all' => false),
        );

        /** @var FieldTypeInterface $field */
        foreach ($contentType->getFields() as $field) {
            if ($field->isSearchable()) {
                $mappingProperties['attribute_' . $field->getFieldId()] = array('type' => $this->formMapper->map($field->getType()), 'include_in_all' => false);
                $mappingProperties['attribute_' . $field->getFieldId() . '_stringValue'] = array('type' => 'string', 'include_in_all' => true);
            }
        }

        $mapping = $this->mappingFactory->create($type);
        $mapping->setProperties($mappingProperties);
        $mapping->send();
    }
1061179
protected function getContentObject(array $contenttype, array $values)
    {
        if (empty($contenttype['class'])) {
            return new Content($this->app, $contenttype, $values);
        }

        if (class_exists($contenttype['class'])) {
            $content = new $contenttype['class']($this->app, $contenttype, $values);

            if (!($content instanceof Content)) {
                throw new StorageException($contenttype['class'] . ' does not extend \\Bolt\\Content.');
            }

            return $content;
        }

        $msg = sprintf('The ContentType %s has an invalid class specified "%s". Unable to log the changes to its records', $contenttype['slug'], $contenttype['class']);
        $this->app['logger.system']->error($msg, ['event' => 'content']);

        throw new StorageException($msg);
    }
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;
    }
630553
public function match($contentType)
    {
        $parts = explode(';', $contentType);
        $mime = array_shift($parts);

        return (bool)preg_match('#[/+]json$#', trim($mime));
    }
933993
public function loadContentTypeFieldDefinitionList($contentTypeId)
    {
        $contentType = $this->contentTypeService->loadContentType($contentTypeId, Language::ALL);

        return new Values\FieldDefinitionList(
            $contentType,
            $contentType->getFieldDefinitions()
        );
    }
929948
public function setContentType($contentType)
    {
        $allowedValues = $this->getContentTypeAllowableValues();
        if (!is_null($contentType) && !in_array($contentType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'contentType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['contentType'] = $contentType;

        return $this;
    }
395
protected function extractMediasFromContentType(ContentTypeInterface $contentType)
    {
        $mediaIds = array();
        $fields = $contentType->getFields();

        foreach ($fields as $field) {
            if ($this->isMediaAttribute($field->getDefaultValue())) {
                $mediaIds[] = $field->getDefaultValue()['id'];
            }
        }

        return $mediaIds;
    }
738360
public function getContentTypeDefinition($contentTypeName = null)
    {

        if ($contentTypeName == null) {
            $contentTypeName = $this->getCurrentContentTypeName();
        }

        return $this->readConnection->getContentTypeDefinition($contentTypeName);
    }
477884
public function getWebResourceClassName($contentType)
    {
        return ($this->hasMappedWebResourceClassName($contentType))
            ? $this->contentTypeWebResourceMap[(string)$contentType]
            : self::DEFAULT_WEB_RESOURCE_MODEL;
    }
118150
public function getContentTypeDefinition($contentTypeName)
    {
        if ($this->getConfiguration()->hasContentType($contentTypeName))
        {
            $cacheKey = '[cmdl][content][' . $contentTypeName . ']';
            if ($this->repository)
            {
                $cacheKey = '[' . $this->repository->getName() . ']' . $cacheKey;
            }

            if ($this->cmdlCachingCheckLastModifiedDate)
            {
                $cacheKey .= '[' . $this->getCMDLLastModifiedDate($contentTypeName) . ']';
            }

            if ($this->getCMDLCache()->contains($cacheKey))
            {
                return unserialize($this->getCMDLCache()->fetch($cacheKey));
            }

            $cmdl = $this->getCMDLForContentType($contentTypeName);

            if ($cmdl)
            {

                $parser = $this->getParser();

                $definition = $parser->parseCMDLString($cmdl, $contentTypeName);

                if ($definition)
                {
                    $this->contentTypeDefinitions[$contentTypeName]['definition'] = $definition;
                    $this->getCMDLCache()->save($cacheKey, serialize($definition), (int)$this->cmdlCaching);

                    return $definition;
                }
            }

        }

        throw new AnyContentClientException ('Unknown content type ' . $contentTypeName);
    }
498553
public function setContentType($contentType = '')
    {
        $this->contentType = $contentType;
        $this->debug->debug(__FUNCTION__, 'setContentType: ', $this->contentType);
    }
94086
private static function getParametersFromContentType(string $contentType): array
    {
        $parameters = array_merge(
            self::getParametersFromGlobal($_GET),
            self::getParametersFromGlobal($_POST),
            self::getParametersFromGlobal($_FILES));
        $paramsSource = [];
        $rawInput = file_get_contents('php://input');
        switch ($contentType) {
            case ContentType::JSON:
                $paramsSource = (array) json_decode($rawInput);
                break;
            case ContentType::XML:
            case ContentType::XML_APP:
                $xml = new \SimpleXMLElement($rawInput);
                $paramsSource = (array) $xml;
                break;
            default:
                parse_str($rawInput, $paramsSource);
        }
        return array_merge($parameters, self::getParametersFromGlobal($paramsSource));
    }