/** * This method convert a document into document link * * @param Document $document The document * * @return DocumentLink The document link */ private function asLink($document) { return new DocumentLink($document->getId(), $document->getUid(), $document->getType(), $document->getTags(), $document->getSlug(), $document->getFragments(), false); }
/** * Return a new link instance to the given Document * @param Document $doc * @return DocumentLink */ public function getDocumentLink(Document $doc) { return new DocumentLink($doc->getId(), $doc->getUid(), $doc->getType(), $doc->getTags(), $doc->getSlug(), array(), false); }