/**
* Remove (soft) existing editorial comment
* @param EditorialComment $comment
* @param User $user
*/
public function remove(EditorialComment $comment, User $user)
{
if ($comment->getUser()->getId() == $user->getId() || $user->isAdmin()) {
$comment->setIsActive(false);
} else {
throw new AccessDeniedHttpException("User is not allowed to remove comment");
}
$this->em->flush();
return true;
}