static function get_menus_map() { global $Sql; $menus = MenuService::_initialize_menus_map(); $query = "\n SELECT id, object, block, position, enabled\n FROM " . DB_TABLE_MENUS . "\n ORDER BY position ASC\n ;"; $result = $Sql->query_while($query, __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { if ($row['enabled'] != MENU_ENABLED) { $menus[BLOCK_POSITION__NOT_ENABLED][] = MenuService::_load($row); } else { $menus[$row['block']][] = MenuService::_load($row); } } $Sql->query_close($result); return $menus; }