eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler::createDraft PHP Method

createDraft() public method

Updates modified date, sets $modifierId and status to Type::STATUS_DRAFT on the new returned draft.
public createDraft ( mixed $modifierId, mixed $contentTypeId ) : eZ\Publish\SPI\Persistence\Content\Type
$modifierId mixed
$contentTypeId mixed
return eZ\Publish\SPI\Persistence\Content\Type
    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);
    }