You are here

function menu_service_get in Services 6

Same name and namespace in other branches
  1. 6.2 services/menu_service/menu_service.inc \menu_service_get()
  2. 7 services/menu_service/menu_service.inc \menu_service_get()

Get the menu from the database.

Return value

Array. A list of all children menu items from a given menu item.

1 string reference to 'menu_service_get'
menu_service_service in services/menu_service/menu_service.module
Implementation of hook_service().

File

services/menu_service/menu_service.inc, line 15
Adds a service type for a menu

Code

function menu_service_get($menu_id = NULL, $fields = array()) {
  if ($menu_id === NULL or trim($menu_id) === '') {
    $menu_id = 'primary-links';
  }
  if (sizeof($fields) === 0) {
    $fields = FALSE;
  }
  $data = menu_tree_page_data($menu_id);
  return menu_service_process($data, $fields);
}