function book_access_ui_menu in Book access 7.2
Same name and namespace in other branches
- 6.2 book_access_ui.module \book_access_ui_menu()
Implements hook_menu().
File
- ./
book_access_ui.module, line 143 - 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',
);
// special admin-only to rebuild all book permissions
$items['book_access/rebuild_all'] = array(
'title' => t('Rebuild all book permissions'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'book_access_ui_rebuild_all',
),
'access arguments' => array(
'administer book access',
),
'type' => MENU_CALLBACK,
'file' => 'book_access_ui.admin.inc',
);
// special admin-only to reset all book permissions
$items['book_access/reset_all'] = array(
'title' => t('Reset all book permissions to defaults'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'book_access_ui_reset_all_to_defaults',
),
'access arguments' => array(
'administer book access',
),
'type' => MENU_CALLBACK,
'file' => 'book_access_ui.admin.inc',
);
return $items;
}