You are here

function book_access_ui_menu in Book access 6.2

Same name and namespace in other branches
  1. 7.2 book_access_ui.module \book_access_ui_menu()

Implements hook_menu().

File

./book_access_ui.module, line 115
User interface for the Book access module.

Code

function book_access_ui_menu() {
  $access_permission = array(
    'administer book access',
  );
  $item = array();

  // We create an additional tab in each top-level book view page.
  $items['node/%node/book_access'] = array(
    'title' => 'Book access',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'book_access_ui_grants_form',
      1,
    ),
    'access callback' => 'book_access_ui_grants_form_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'book_access_ui.admin.inc',
  );
  $items['book_access/delete/user_permission/%node/%user'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'book_access_ui_user_permissions_remove',
      3,
      4,
    ),
    'access arguments' => $access_permission,
    'type' => MENU_CALLBACK,
    'file' => 'book_access_ui.admin.inc',
  );
  return $items;
}