function loadMap($base_menu) { $map = AMPSystem_Map::instance(); trigger_error($base_menu . ' is base'); $menumap = $map->getMenu($base_menu); $menumap[AMP_MENU_ROOT_ENTRY] = $menumap[$base_menu]; return $menumap; }
function _init_tree() { require_once 'AMP/System/Map.inc.php'; $map_source =& AMPSystem_Map::instance(); $map = $map_source->getMenu(); $home = $map['home']; unset($map['home']); $this->_tree = new AMP_Menu_Tree(); foreach ($home as $key => $def) { $branch = new AMP_Menu_Tree(); $branch->id = $key; $branch->label = $def['label']; $branch->href = isset($def['href']) ? $def['href'] : '#'; if (isset($def['child']) && $def['child'] && isset($map[$def['child']])) { $this->_init_branch($branch, $map, $def['child']); } $this->_tree->addChild($branch); unset($branch); } }
function loadMap() { $map =& AMPSystem_Map::instance(); $menumap = $map->getMenu(); $menumap[AMP_MENU_ROOT_ENTRY] = $menumap[$map->top]; return $menumap; }