You are here

function book_access_menu in Book access 5

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

Implements hook_menu().

File

./book_access.module, line 74
Allows access control for Drupal book nodes.

Code

function book_access_menu($may_cache) {
  if ($may_cache) {

    // We create an additional tab in the book admin page.
    $items[] = array(
      'path' => 'admin/content/book/access',
      'title' => t('Access control'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'book_access_admin_form',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 7,
      'access' => user_access('administer book access'),
    );
  }
  return $items;
}