eZ\Publish\Core\REST\Server\Controller\ContentType::copyContentType PHP Метод

copyContentType() публичный Метод

Copies a content type. The identifier of the copy is changed to copy_of__ and a new remoteId is generated.
public copyContentType ( $contentTypeId ) : ResourceCreated
$contentTypeId
Результат eZ\Publish\Core\REST\Server\Values\ResourceCreated
    public function copyContentType($contentTypeId)
    {
        $copiedContentType = $this->contentTypeService->copyContentType($this->contentTypeService->loadContentType($contentTypeId));
        return new Values\ResourceCreated($this->router->generate('ezpublish_rest_loadContentType', array('contentTypeId' => $copiedContentType->id)));
    }