You are here

function example_menu_tree_data in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_menu_tree_data()

File

coder_upgrade/tests/old/samples/example.module, line 623

Code

function example_menu_tree_data() {
  $sql = "menu_tree_data\n    SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*\n    FROM {menu_links} ml LEFT JOIN {menu_router} m ON m.path = ml.router_path\n    WHERE ml.menu_name = '%s'\n    ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC";
  $result = db_query($sql, $menu['menu_name']);
  $tree = menu_tree_data($result);
  $sql = "\n    SELECT b.*, m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, ml.*\n    FROM {menu_links} ml INNER JOIN {menu_router} m ON m.path = ml.router_path\n    INNER JOIN {book} b ON ml.mlid = b.mlid\n    WHERE " . implode(' AND ', $match) . "\n    ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC";
  $data['tree'] = menu_tree_data(db_query($sql, $args), array(), $item['depth']);
}