/** * Get New Document. * * @return \Dms\Document\Document */ public function getNewDocument() { if (null === $this->new_document) { $this->new_document = new Document(); if (null !== $this->document) { $this->new_document->setName($this->document->getName()); } } return $this->new_document; }