eZ\Bundle\EzPublishCoreBundle\Features\Context\FieldTypeContext::publishContentType PHP Метод

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

Publishes the stored contenttype.
private publishContentType ( )
    private function publishContentType()
    {
        $contentTypeGroup = $this->contentTypeService->loadContentTypeGroupByIdentifier('Content');
        $contentTypeCreateStruct = $this->fieldConstructionObject['contentType'];
        $contentTypeDraft = $this->contentTypeService->createContentType($contentTypeCreateStruct, array($contentTypeGroup));
        $this->contentTypeService->publishContentTypeDraft($contentTypeDraft);
        $contentTypeIdentifier = $this->fieldConstructionObject['contentType']->identifier;
        $contentType = $this->contentTypeService->loadContentTypeByIdentifier($contentTypeIdentifier);
        $this->fieldConstructionObject['contentType'] = $contentType;
        $this->fieldConstructionObject['objectState'] = self::CONTENT_TYPE_PUBLISHED;
    }