/** * Get document id * * @param Newscoop\Entity\Comment $comment * @return string */ public function getDocumentId(DocumentInterface $comment) { return sprintf('%s-%d', $this->getType(), $comment->getId()); }
/** * Get document id * * @param Newscoop\Entity\Article $article * @return string */ public function getDocumentId(DocumentInterface $article) { return sprintf('%s-%d-%d', $this->getType(), $article->getNumber(), $article->getLanguageId()); }