You are here

function ldap_query_menu in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_query/ldap_query.module \ldap_query_menu()
  2. 7.2 ldap_query/ldap_query.module \ldap_query_menu()

File

ldap_query/ldap_query.module, line 11

Code

function ldap_query_menu() {
  $menu_offset = 4;
  $items['admin/config/people/ldap/query'] = array(
    'title' => 'Queries',
    'page callback' => 'ldap_query_index',
    'page arguments' => array(),
    'weight' => 6,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/list'] = array(
    'title' => 'Queries',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/people/ldap/query/add'] = array(
    'title' => 'Add LDAP Query',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ldap_query_admin_form',
      'add',
    ),
    'type' => MENU_LOCAL_TASK + MENU_CONTEXT_INLINE,
    'weight' => 3,
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/edit/%'] = array(
    'title' => 'Edit LDAP Query',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ldap_query_admin_form',
      'edit',
      $menu_offset + 2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/test/%'] = array(
    'title' => 'Test LDAP Query',
    'page callback' => 'ldap_query_test',
    'page arguments' => array(
      $menu_offset + 2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/delete/%'] = array(
    'title' => 'Delete LDAP Query',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ldap_query_admin_delete',
      $menu_offset + 2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/enable/%'] = array(
    'title' => 'Enable LDAP Query',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ldap_query_admin_enable_disable',
      $menu_offset + 1,
      $menu_offset + 2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  $items['admin/config/people/ldap/query/disable/%'] = array(
    'title' => 'Enable LDAP Query',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ldap_query_admin_enable_disable',
      $menu_offset + 1,
      $menu_offset + 2,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'ldap_query.admin.inc',
  );
  return $items;
}