/** * Create Prismic specific Route Paramters from the given Document Link according to routing options * @param DocumentLink $link * @return array */ public function getRouteParams(DocumentLink $link) { $document = $this->getContext()->getDocumentById($link->getId()); $bookmark = $this->getContext()->findBookmarkByDocument($document); return array($this->routerOptions->getIdParam() => $link->getId(), $this->routerOptions->getUidParam() => $link->getUid(), $this->routerOptions->getMaskParam() => $document->getType(), $this->routerOptions->getBookmarkParam() => $bookmark, $this->routerOptions->getRefParam() => $this->getContext()->getRefAsString(), $this->routerOptions->getSlugParam() => $document->getSlug()); }