/**
* Returns ContentType identifier based on $contentId.
*
* @param int|mixed $contentId
*
* @return string
*/
private function getContentTypeIdentifier($contentId)
{
$contentTypeService = $this->repository->getContentTypeService();
$contentService = $this->repository->getContentService();
$contentType = $this->repository->sudo(function () use($contentId, $contentTypeService, $contentService) {
$contentType = $contentTypeService->loadContentType($contentService->loadContent($contentId)->contentInfo->contentTypeId);
return $contentType;
});
return $contentType->identifier;
}