Example #1
0
 public function canShowCategory(Category $category, Forum $forum = null)
 {
     if ($forum) {
         if ($category->getForum()) {
             if ($category->getForum()->getId() != $forum->getId()) {
                 return false;
             }
         }
         if (!$this->canShowForum($forum)) {
             return false;
         }
     }
     if (!$category->isAuthorisedToRead($this->securityContext)) {
         return false;
     }
     return true;
 }