public function createDraft($modifierId, $contentTypeId)
    {
        $createStruct = $this->mapper->createCreateStructFromType(
            $this->load($contentTypeId, Type::STATUS_DEFINED)
        );
        $createStruct->status = Type::STATUS_DRAFT;
        $createStruct->modifierId = $modifierId;
        $createStruct->modified = time();

        return $this->internalCreate($createStruct, $contentTypeId);
    }
public function createDraft($modifierId, $contentTypeId)
    {
        $createStruct = $this->mapper->createCreateStructFromType(
            $this->load($contentTypeId, Type::STATUS_DEFINED)
        );
        $createStruct->status = Type::STATUS_DRAFT;
        $createStruct->modifierId = $modifierId;
        $createStruct->modified = time();

        return $this->internalCreate($createStruct, $contentTypeId);
    }
public function createDraft ( $ modifierId , $ contentTypeId ) { $ createStruct = $ this -> mapper -> createCreateStructFromType ( $ this -> load ( $ contentTypeId , Type :: STATUS_DEFINED ) ) ; $ createStruct -> status = Type :: STATUS_DRAFT ; $ createStruct -> modifierId = $ modifierId ; $ createStruct -> modified = time ( ) ; return $ this -> internalCreate ( $ createStruct , $ contentTypeId ) ; }
Creates a draft of existing defined content type.

Updates modified date, sets $modifierId and status to Type::STATUS_DRAFT on the new returned draft.

@param mixed $modifierId
@param mixed $contentTypeId

@throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If type with defined status is not found

@return \eZ\Publish\SPI\Persistence\Content\Type
Creates a draft of existing defined content type .