function advpoll_menu in Advanced Poll 7.3
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 advpoll.module \advpoll_menu()
- 7.2 advpoll.module \advpoll_menu()
Implements hook_menu().
File
- ./
advpoll.module, line 34
Code
function advpoll_menu() {
$menu['admin/config/search/advpoll'] = array(
'title' => 'Advanced Poll',
'description' => 'Configure sitewide Advanced Poll settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'advpoll_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer polls',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'advpoll.admin.inc',
'file path' => drupal_get_path('module', 'advpoll') . '/includes',
);
/* 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/advpoll/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/advpoll/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/advpoll/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/advpoll/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',
);
return $menu;
}