function example_menu in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/tests/old/samples/example.module \example_menu()
Implementation of hook_menu().
Example for comment_wildcard.
File
- coder_upgrade/
tests/ old/ samples/ example.module, line 856
Code
function example_menu() {
global $user;
$items = array();
$access = user_access('administer all signups');
$items['node/%_comment/signup'] = array(
'title' => user_access('access administration pages') ? t('Signup') : t('Signup settings'),
'description' => 'Add a signup node.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'signup_settings_page',
),
'access callback' => $access,
'type' => MENU_LOCAL_TASK,
);
$items['admin/content/signup'] = array(
'title' => 'Signup overview',
'description' => t('View all signup-enabled posts, and open or close signups on them.'),
'page callback' => 'example_signup_admin_form',
'access callback' => $access,
'type' => MENU_LOCAL_TASK,
);
}