function advpoll_menu in Advanced Poll 7
Same name and namespace in other branches
- 5 advpoll.module \advpoll_menu()
- 6.3 advpoll.module \advpoll_menu()
- 6 advpoll.module \advpoll_menu()
- 6.2 advpoll.module \advpoll_menu()
- 7.3 advpoll.module \advpoll_menu()
- 7.2 advpoll.module \advpoll_menu()
Implements hook_menu()
File
- ./
advpoll.module, line 33
Code
function advpoll_menu() {
// changed to inspect-votes because it conflicted with path for standard poll module.
$menu['node/%node/advpoll/votes'] = array(
'title' => 'Votes',
'page callback' => 'advpoll_votes_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_votes_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// Show electoral list tab if using the functionality.
$menu['node/%node/electoral-list'] = array(
'title' => 'Electoral list',
'page callback' => 'advpoll_electoral_list_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_electoral_list_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// Allow voters to be removed.
$menu['node/%node/remove'] = array(
'page callback' => 'advpoll_remove_voter',
'page arguments' => array(
1,
),
'access arguments' => array(
'administer polls',
),
'weight' => 3,
'type' => MENU_CALLBACK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// Allow votes to be cleared.
$menu['node/%node/advpoll/votes/clear'] = array(
'page callback' => 'advpoll_clear_votes_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_clear_votes_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// Show the write-ins tab if poll is set to use them.
$menu['node/%node/write-ins'] = array(
'title' => 'Write-ins',
'page callback' => 'advpoll_writeins_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_writeins_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// show results of poll to administrators
$menu['node/%node/results'] = array(
'title' => 'Results',
'page callback' => 'advpoll_results_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_results_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'advpoll.pages.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
// Allow votes to be cleared.
$menu['node/%node/advpoll/votes/clear'] = array(
'page callback' => 'advpoll_clear_votes_page',
'page arguments' => array(
1,
),
'access callback' => '_advpoll_clear_votes_access',
'access arguments' => array(
1,
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
'file' => 'advpoll.pages.inc',
);
return $menu;
}