You are here

function access_menu in Access Control Kit 7

Implements hook_menu().

File

./access.module, line 987
The access control kit module.

Code

function access_menu() {

  // Manage access grants.
  $items['admin/access'] = array(
    'title' => 'Access',
    'description' => 'Manage access grants.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'access_overview_grants',
    ),
    'access arguments' => array(
      'administer access grants',
    ),
    // -2 places it between "People" and "Modules" on the default admin menu.
    'weight' => -2,
    'file' => 'access_grants.admin.inc',
  );
  $items['admin/access/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/access/add'] = array(
    'title' => 'Add access grant',
    'page callback' => 'access_grant_add_list',
    'access arguments' => array(
      'administer access grants',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'access_grants.admin.inc',
  );
  $items['admin/access/add/%access_scheme_machine_name'] = array(
    'title' => 'Add access grant for scheme',
    'title callback' => 'access_grant_add_page_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'access_grant_add',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer access grants',
    ),
    'file' => 'access_grants.admin.inc',
  );
  $items['admin/access/grant/%access_grant'] = array(
    'title callback' => 'entity_label',
    'title arguments' => array(
      'access_grant',
      3,
    ),
    'page callback' => 'access_grant_page',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer access grants',
    ),
    'file' => 'access.pages.inc',
  );
  $items['admin/access/grant/%access_grant/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/access/grant/%access_grant/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'access_grant_edit',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer access grants',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'access_grants.admin.inc',
  );
  $items['admin/access/grant/%access_grant/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'access_grant_delete_confirm',
      3,
    ),
    'access arguments' => array(
      'administer access grants',
    ),
    'file' => 'access_grants.admin.inc',
  );

  // Manage access schemes.
  $items['admin/structure/access'] = array(
    'title' => 'Access schemes',
    'description' => 'Define access control schemes.',
    'page callback' => 'access_overview_schemes',
    'access arguments' => array(
      'administer access schemes',
    ),
    'file' => 'access_schemes.admin.inc',
  );
  $items['admin/structure/access/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/access/add'] = array(
    'title' => 'Add access scheme',
    'page callback' => 'access_scheme_add_list',
    'access arguments' => array(
      'administer access schemes',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'access_schemes.admin.inc',
  );
  $items['admin/structure/access/add/%access_scheme_type'] = array(
    'title' => 'Add access scheme',
    'page callback' => 'access_scheme_add',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer access schemes',
    ),
    'file' => 'access_schemes.admin.inc',
  );
  $items['admin/structure/access/%access_scheme_machine_name'] = array(
    'title callback' => 'entity_label',
    'title arguments' => array(
      'access_scheme',
      3,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'access_scheme_form',
      3,
    ),
    'access arguments' => array(
      'administer access schemes',
    ),
    'file' => 'access_schemes.admin.inc',
  );
  $items['admin/structure/access/%access_scheme_machine_name/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/structure/access/%access_scheme_machine_name/delete'] = array(
    'title' => 'Delete',
    'page arguments' => array(
      'access_scheme_delete_confirm',
      3,
    ),
    'access arguments' => array(
      'administer access schemes',
    ),
    'file' => 'access_schemes.admin.inc',
  );
  return $items;
}