app\models\Document::cloneDocument PHP Method

cloneDocument() public method

public cloneDocument ( ) : mixed
return mixed
    public function cloneDocument()
    {
        $document = Document::createNew($this);
        $document->path = $this->path;
        $document->preview = $this->preview;
        $document->name = $this->name;
        $document->type = $this->type;
        $document->disk = $this->disk;
        $document->hash = $this->hash;
        $document->size = $this->size;
        $document->width = $this->width;
        $document->height = $this->height;
        return $document;
    }