public function resolve(EditorialComment $comment, User $user, $value = true)
{
if ($comment->getUser()->getId() == $user->getId() || $user->isAdmin()) {
$comment->setResolved($value);
} else {
throw new AccessDeniedHttpException("User is not allowed to resolve comment");
}
$this->em->flush();
return true;
}