public function deleteCommenter($commenter) { $em = $this->getEntityManager(); $comments = $this->findByCommenter($commenter->getId()); foreach ($comments as $comment) { $this->setCommentStatus($comment, 'deleted'); } }