eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension::getContentType PHP Метод

getContentType() приватный Метод

Get ContentType by Content/ContentInfo.
private getContentType ( eZ\Publish\API\Repository\Values\ValueObject $content ) : eZ\Publish\API\Repository\Values\ContentType\ContentType | null
$content eZ\Publish\API\Repository\Values\ValueObject
Результат eZ\Publish\API\Repository\Values\ContentType\ContentType | null
    private function getContentType(ValueObject $content)
    {
        if ($content instanceof Content) {
            return $this->repository->getContentTypeService()->loadContentType($content->getVersionInfo()->getContentInfo()->contentTypeId);
        } elseif ($content instanceof ContentInfo) {
            return $this->repository->getContentTypeService()->loadContentType($content->contentTypeId);
        }
    }