public function setCommentRecommended(Comment $comment, $recommended) { $em = $this->getEntityManager(); $comment->setRecommended($recommended); $em->persist($comment); }