Returns ContentType identifier based on $contentId.

@param int|mixed $contentId

@return string
778415
private function getContentIdentifier($contentId)
    {
        $contentType = $this->contentTypeService->loadContentType(
            $this->contentService
                ->loadContent($contentId)
                ->contentInfo
                ->contentTypeId
        );

        return $contentType->identifier;
    }
538000
public function getInfoCollectorFields($contentId)
    {
        $fields = [];

        $content = $this->contentService->loadContent($contentId);

        $contentType = $this->contentTypeService
            ->loadContentType($content->contentInfo->contentTypeId);

        foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {

            if ($fieldDefinition->isInfoCollector) {
                $fields[$fieldDefinition->id] = $fieldDefinition->getName();
            }
        }

        return $fields;
    }
97273
private function loadVersionInfo($contentId): VersionInfo
    {
        return $this->repository->sudo(
            static function (Repository $repository) use ($contentId): VersionInfo {
                return $repository->getContentService()->loadVersionInfoById($contentId);
            }
        );
    }
1151905
public function contentType($contentType = null) {
			if ($contentType != null) {
				$this->_contentType = $contentType;
				return true;
			}
			else {
				return $this->_contentType;
			}
		}
359990
public function getParentContentUidByUid($contentUid)
    {
        $q = $this->_em->getConnection()
                ->createQueryBuilder()
                ->select('c.parent_uid')
                ->from('content_has_subcontent', 'c')
                ->where('c.content_uid = :uid')
                ->setParameter('uid', $contentUid);

        return $q->execute()->fetchAll(\PDO::FETCH_COLUMN);
    }
1057242
public function getContentObjectWords($contentId)
    {
        $query = $this->dbHandler->createSelectQuery();

        $this->setContentObjectWordsSelectQuery($query);

        $stmt = $query->prepare();
        $stmt->execute(['contentId' => $contentId]);

        $wordIDList = [];

        while (false !== ($row = $stmt->fetch(PDO::FETCH_NUM))) {
            $wordIDList[] = $row[0];
        }

        return $wordIDList;
    }
401426
public function loadContentTypeDraft($contentTypeId)
    {
        $contentTypeDraft = $this->contentTypeService->loadContentTypeDraft($contentTypeId);

        return new Values\RestContentType(
            $contentTypeDraft,
            $contentTypeDraft->getFieldDefinitions()
        );
    }
156468
private function isUserContent($contentId)
    {
        try {
            $this->repository->getUserService()->loadUser($contentId);

            return true;
        } catch (NotFoundException $e) {
            return false;
        }
    }
1019786
def _verified_content_type_from_id(content_type_id):
    # type: (int) -> ContentType
    
    try:
        return ContentType(content_type_id)
    except ValueError as error:
        raise UnknownIdentityError("Unknown content type {}".format(content_type_id), error)
1283803
public function getField($fieldId)
    {
        $resolved = $this->getResolved();
        if (!$resolved instanceof ContentTypeInterface) {
            return null;
        }

        return $resolved->getField($fieldId);
    }
659814
protected function getUriForContent( $contentId, $absolute = false )
    {
        /* @var $model \Grid\Core\Model\Uri\Model */
        $service    = $this->getServiceLocator();
        $model      = $service->get( 'Grid\Core\Model\Uri\Model' );
        $subdomain  = $this->getSiteInfo()->getSubdomainId();
        $uri        = $model->findDefaultByContentLocale(
            $contentId,
            $this->locale,
            $subdomain
        );

        if ( empty( $uri ) )
        {
            return $this->getFallbackUri( $contentId, $absolute );
        }

        $result = '/' . $uri->safeUri;

        if ( $absolute || $subdomain != $uri->subdomainId )
        {
            $result = $this->getSiteInfo()
                           ->getSubdomainUrl(
                               $this->getSubdomain( $uri->subdomainId ),
                               $result
                           );
        }

        return $result;
    }
975080
public function exportAllAction($contentId)
    {
        $content = $this->contentService->loadContent($contentId);

        $exportCriteria = new ExportCriteria(
            [
                'content' => $content,
            ]
        );

        $export = $this->exporter->exportAll($exportCriteria);

        $writer = Writer::createFromFileObject(new SplTempFileObject());
        $writer->setDelimiter(",");
        $writer->setNewline("\r\n"); //use windows line endings for compatibility with some csv libraries
        $writer->setOutputBOM(Writer::BOM_UTF8); //adding the BOM sequence on output
        $writer->insertOne($export->header);
        $writer->insertAll($export->contents);

        $writer->output('export.csv');
        return new Response('');

    }
610058
static public function contentTypeToSuffix($contentType)
    {
        $types = self::byContentType();
        return isset($types[$contentType]) ? $types[$contentType]['suffix'] : null;
    }
24237
public function countLocationsByContentId($contentId)
    {
        $q = $this->handler->createSelectQuery();
        $q
            ->select(
                $q->alias($q->expr->count('*'), 'count')
            )
            ->from($this->handler->quoteTable('ezcontentobject_tree'))
            ->where(
                $q->expr->eq(
                    $this->handler->quoteColumn('contentobject_id'),
                    $q->bindValue($contentId, null, \PDO::PARAM_INT)
                )
            );
        $stmt = $q->prepare();
        $stmt->execute();
        $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

        return (int)$res[0]['count'];
    }
272101
protected function getObjectStateIds($contentId)
    {
        $objectStateIds = array();

        foreach ($this->objectStateHandler->loadAllGroups() as $objectStateGroup) {
            $objectStateIds[] = $this->objectStateHandler->getContentState(
                $contentId,
                $objectStateGroup->id
            )->id;
        }

        return $objectStateIds;
    }
371741
public function deleteContentTypeDraft($contentTypeId)
    {
        $contentTypeDraft = $this->contentTypeService->loadContentTypeDraft($contentTypeId);
        $this->contentTypeService->deleteContentType($contentTypeDraft);

        return new Values\NoContent();
    }
149083
private function loadContent(int $contentId, string $language): Content
    {
        return $this->repository->getContentService()->loadContent($contentId, [$language]);
    }