You are here

function services_menu in Services 7.3

Same name and namespace in other branches
  1. 5 services.module \services_menu()
  2. 6.3 services.module \services_menu()
  3. 6 services.module \services_menu()
  4. 6.2 services.module \services_menu()
  5. 7 services.module \services_menu()

Implements hook_menu().

Services UI is defined in the export-ui plugin.

File

./services.module, line 250
Provides a generic but powerful API for web services.

Code

function services_menu() {
  $items = array();
  if (module_exists('ctools')) {
    $endpoints = services_endpoint_load_all();
    foreach ($endpoints as $endpoint) {
      if (empty($endpoint->disabled)) {
        $items[$endpoint->path] = array(
          'title' => 'Services endpoint',
          'access callback' => 'services_access_menu',
          'page callback' => 'services_endpoint_callback',
          'page arguments' => array(
            $endpoint->name,
          ),
          'type' => MENU_CALLBACK,
        );
      }
    }
  }
  $items['services/session/token'] = array(
    'page callback' => '_services_session_token',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/services/services-security'] = array(
    'type' => MENU_NORMAL_ITEM,
    'title' => 'Services Security update',
    'description' => 'Services module security updates',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'services_security_admin_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'services.admin.inc',
  );
  return $items;
}