function module_grants_menu in Module Grants 6
Same name and namespace in other branches
- 6.4 module_grants.module \module_grants_menu()
- 6.3 module_grants.module \module_grants_menu()
- 7 module_grants.module \module_grants_menu()
Implementation of hook_menu().
Define new menu items. Existing menu items are modified through hook_menu_alter().
File
- ./
module_grants.module, line 27 - Module to enable access control for unpublished content. Also makes sure that modules that operate on access grants behave in the expected way when enabled together.
Code
function module_grants_menu() {
$items = array();
// Create a normal menu item in root Navigation menu
$items['content'] = array(
'title' => 'My content',
'page callback' => 'module_grants_editable_nodes',
'access arguments' => array(
'access content summary',
),
);
// Add two tabs on page defined above
$items['content/editable'] = array(
'title' => 'Editable',
'page callback' => 'module_grants_editable_nodes',
'access arguments' => array(
'access content summary',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['content/viewable'] = array(
'title' => 'Viewable',
'page callback' => 'module_grants_viewable_nodes',
'access arguments' => array(
'access content summary',
),
'type' => MENU_LOCAL_TASK,
);
return $items;
}