config_object = $base_object->config; $this->db = $base_object->db; $this->base_object = $base_object; } // end __construct public function get_sitemap() { // get cache data $cache_object = new Cache($base_object); if (!$data = $cache_object->get_data('sitemap_object_get_sitemap')) { // get menu structure $structure_object = new Structure($this->base_object); $item_object = new Item($this->base_object); $all_structure = $structure_object->get_all_tree_full_path(1); foreach ($all_structure as $structure) { // get structure items $all_items = array(); $item_list = $item_object->get_all_structure_items($structure->id); foreach ($item_list as $item) { $item->structure_short_uri = $structure->short_uri; $item->structure_uri_path = $structure->uri_path; $all_items[] = $item; } $structure->items = $all_items; /*if (count($all_items) > 0) { $structure->name = $structure->name.' ('.count($all_items).')'; }*/ $data['structure'][] = $structure; } } return $data; } } ?>