You are here

function menu_service_service in Services 7

Same name and namespace in other branches
  1. 6 services/menu_service/menu_service.module \menu_service_service()
  2. 6.2 services/menu_service/menu_service.module \menu_service_service()

Implementation of hook_service().

File

services/menu_service/menu_service.module, line 12
Adds a service type for a menu

Code

function menu_service_service() {
  return array(
    array(
      '#method' => 'menu.get',
      '#callback' => 'menu_service_get',
      '#file' => array(
        'file' => 'inc',
        'module' => 'menu_service',
      ),
      '#args' => array(
        array(
          '#name' => 'menu_id',
          '#type' => 'string',
          '#optional' => TRUE,
          '#description' => t('Menu ID. Defaults to "primary-links".'),
        ),
        array(
          '#name' => 'fields',
          '#type' => 'array',
          '#optional' => TRUE,
          '#description' => t('An list of fields to return. If left empty, all fields will be returned '),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Retrieves a menu tree.'),
    ),
  );
}