src/Repository/DraftableEntityAwareTrait.php
public function createDraft(array $data = null, $persist = false)
    {
        $data['isDraft'] = true;

        return $this->create($data, $persist);
    }
public function createDraft(array $data = null, $persist = false)
    {
        $data['isDraft'] = true;

        return $this->create($data, $persist);
    }
Creates an entity in draft mode.

@param array $data
@param bool  $persist

@return EntityInterface