public function canRestorePost(Post $post, Forum $forum = null) { if (!$this->securityContext->isGranted('ROLE_MODERATOR')) { return false; } if (!$post->isDeleted()) { return false; } if (!$this->canShowPost($post, $forum) && !$this->securityContext->isGranted('ROLE_MODERATOR')) { return false; } return true; }