/** * * @access protected * @param \CCDNForum\ForumBundle\Entity\Category $category * @return array */ protected function getFilterQueryStrings(Category $category) { $params = array(); if ($category->getForum()) { $params['forum_filter'] = $category->getForum()->getId(); } return $params; }
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; }