You are here

function book_access_menu in Book access 6

Same name and namespace in other branches
  1. 5 book_access.module \book_access_menu()

Implements hook_menu().

File

./book_access.module, line 154
Allows access control for book nodes on a per book basis. It is based on forum_access.module and tac_lite.module.

Code

function book_access_menu() {
  $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_permissions_form',
      1,
    ),
    'access callback' => 'book_access_permissions_form_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'book_access.admin.inc',
  );
  $items['book_access/delete/user_permission/%node/%user'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'book_access_remove_user_permissions',
      3,
      4,
    ),
    'access arguments' => array(
      'administer book access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'book_access.admin.inc',
  );
  return $items;
}