public function get_feed_list() { $module_id = $this->categories_manager->get_module_id(); $list = new FeedsList(); $cats_tree = new FeedsCat($module_id, 0, LangLoader::get_message('root', 'main')); $categories = $this->categories_manager->get_categories_cache()->get_categories(); $this->build_feeds_sub_list($module_id, $categories, $cats_tree, 0); $list->add_feed($cats_tree, Feed::DEFAULT_FEED_NAME); return $list; }
private function create_module_map_sections($categories, $id_cat, $auth_mode) { $category = $this->categories_manager->get_categories_cache()->get_category($id_cat); $this_category = new SitemapLink($category->get_name(), $this->get_category_url($category)); $section = new SitemapSection($this_category); $i = 0; foreach ($categories as $id => $category) { if ($auth_mode == Sitemap::AUTH_PUBLIC) { $this_auth = Authorizations::check_auth(RANK_TYPE, User::VISITOR_LEVEL, $category->get_authorizations(), Category::READ_AUTHORIZATIONS); } else { $this_auth = AppContext::get_current_user()->check_auth($category->get_authorizations(), Category::READ_AUTHORIZATIONS); } if ($this_auth && $id != Category::ROOT_CATEGORY && $category->get_id_parent() == $id_cat) { $section->add($this->create_module_map_sections($categories, $id, $auth_mode)); $i++; } } if ($i == 0) { $section = $this_category; } return $section; }