function content_access_menu in Content Access 6
Same name and namespace in other branches
- 5 content_access.module \content_access_menu()
- 7 content_access.module \content_access_menu()
Implementation of hook_menu().
File
- ./
content_access.module, line 11 - Content access module file.
Code
function content_access_menu() {
$items = array();
$items['node/%node/access'] = array(
'title' => 'Access control',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'content_access_page',
1,
),
'access callback' => 'content_access_node_page_access',
'access arguments' => array(
1,
),
'file' => 'content_access.admin.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
foreach (node_get_types('types', NULL, TRUE) as $type) {
$type_url_str = str_replace('_', '-', $type->type);
$items['admin/content/node-type/' . $type_url_str . '/access'] = array(
'title' => 'Access control',
'description' => 'Configure content access control.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'content_access_admin_settings',
$type->type,
),
'access callback' => 'content_access_admin_settings_access',
'access arguments' => array(),
'type' => MENU_LOCAL_TASK,
'file' => 'content_access.admin.inc',
'weight' => 1,
);
}
return $items;
}