/** * @param \Sonata\NewsBundle\Model\CommentInterface $comment * @return string */ public function generate(CommentInterface $comment) { return md5(sprintf('%s/%s/%s', $comment->getPost()->getId(), $comment->getId(), $this->salt)); }