public function canReopenTopic(Topic $topic, Forum $forum = null) { if (!$topic->isClosed()) { return false; } if (!$this->canShowTopic($topic, $forum)) { if (!$this->securityContext->isGranted('ROLE_ADMIN')) { return false; } } if (!$this->securityContext->isGranted('ROLE_MODERATOR')) { return false; } return true; }