eZ\Publish\Core\SignalSlot\ContentTypeService::copyContentType PHP Method

copyContentType() public method

New Type will have $userId as creator / modifier, created / modified should be updated with current time, updated remoteId and identifier should be appended with '_' + unique string.
public copyContentType ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, eZ\Publish\API\Repository\Values\User\User $user = null ) : eZ\Publish\API\Repository\Values\ContentType\ContentType
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$user eZ\Publish\API\Repository\Values\User\User if null the current user is used
return eZ\Publish\API\Repository\Values\ContentType\ContentType
    public function copyContentType(ContentType $contentType, User $user = null)
    {
        $returnValue = $this->service->copyContentType($contentType, $user);
        $this->signalDispatcher->emit(new CopyContentTypeSignal(array('contentTypeId' => $contentType->id, 'userId' => $user !== null ? $user->id : null)));
        return $returnValue;
    }