コード例 #1
0
ファイル: EDBlogExtension.php プロジェクト: NegMozzie/tapha
 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);
 }
コード例 #2
0
ファイル: CommentController.php プロジェクト: sebardo/blog
 /**
  * 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();
 }