public function isMyComment(Comment $comment) { $myComments = $this->session->get('sessionComments', false); if (!$myComments) { return false; } else { $myComments = unserialize($myComments); } return in_array($comment->getId(), $myComments); }
/** * Creates a form to delete a Comment entity. * * @param Comment $comment The Comment entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(Comment $comment) { return $this->createFormBuilder()->setAction($this->generateUrl('blog_comment_delete', array('id' => $comment->getId())))->setMethod('DELETE')->getForm(); }