You are here

function clients_menu in Web Service Clients 7

Same name and namespace in other branches
  1. 6.2 clients.module \clients_menu()
  2. 6 clients.module \clients_menu()
  3. 7.3 clients.module \clients_menu()
  4. 7.2 clients.module \clients_menu()

Implementation of hook_menu()

File

./clients.module, line 48
Clients module - handles keys and service connections and provides an API for clients

Code

function clients_menu() {
  $items = array();
  $items['admin/settings/clients'] = array(
    'title' => 'Clients',
    'description' => 'Clients',
    'page callback' => 'clients_connections_list',
    'file' => 'clients.connection.admin.inc',
    'access callback' => 'clients_access_callback',
    // TODO: this is doomed.
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/settings/clients/connections'] = array(
    'title' => 'Connections',
    'weight' => 1,
    'description' => 'List connections',
    'page callback' => 'clients_connections_list',
    'file' => 'clients.connection.admin.inc',
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/clients/connections/add/%'] = array(
    'title' => 'Add connection',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clients_connection_add',
      5,
    ),
    'file' => 'clients.connection.admin.inc',
    'access arguments' => array(
      'admin clients connections',
    ),
  );
  $items['admin/settings/clients/connections/view/%'] = array(
    'title' => 'Show connection',
    'description' => 'Show connection',
    'page callback' => 'clients_connection_view',
    'page arguments' => array(
      5,
    ),
    'file' => 'clients.connection.admin.inc',
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/connections/edit/%'] = array(
    'title' => 'Edit connection',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clients_connection_edit',
      5,
    ),
    'file' => 'clients.connection.admin.inc',
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/connections/delete/%'] = array(
    'title' => 'Delete connection',
    'description' => 'Delete a connection',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'client_delete_confirm',
      'connection',
      5,
    ),
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/connections/test/%'] = array(
    'title' => 'Test connection',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clients_connection_test_form',
      5,
    ),
    'file' => 'clients.connection.admin.inc',
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/resources'] = array(
    'title' => 'Resources',
    'weight' => 2,
    'description' => 'List resources',
    'page callback' => 'clients_resources',
    'access arguments' => array(
      'admin clients resources',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/clients/resources/add'] = array(
    'title' => 'Add resource',
    'weight' => 1,
    'description' => 'Add resource',
    'page callback' => 'clients_resources_add',
    'access arguments' => array(
      'admin clients resources',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/clients/resources/%'] = array(
    'title' => 'Show resource',
    'description' => 'Show resource',
    'page callback' => 'clients_resource_view',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'admin clients resources',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/resources/%/edit'] = array(
    'title' => 'Edit resource',
    'weight' => 1,
    'description' => 'Edit data source',
    'page callback' => 'clients_resources_edit',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'admin clients resources',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/resources/%/delete'] = array(
    'title' => 'Delete resource',
    'description' => 'Delete a resource',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'client_delete_confirm',
      'resource',
      5,
    ),
    'access arguments' => array(
      'admin clients connections',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/clients/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clients_admin_cache',
    ),
    'access arguments' => array(
      'admin clients resources',
    ),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/clients/settings/cache'] = array(
    'title' => 'Cache',
    'weight' => -1,
    'description' => 'cccc connections',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clients_admin_cache',
    ),
    'access arguments' => array(
      'admin clients resources',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  return $items;
}