function rate_menu in Rate 7
Same name and namespace in other branches
- 6.2 rate.module \rate_menu()
- 7.2 rate.module \rate_menu()
Implements hook_menu().
File
- ./
rate.module, line 70 - Rate module
Code
function rate_menu() {
$menu = array();
$menu[RATE_PATH_ADMIN_PAGE] = array(
'title' => 'Rate widgets',
'description' => 'Manage rating widgets.',
'page callback' => 'rate_admin_page',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_LIST] = array(
'title' => 'List',
'page callback' => 'rate_admin_page',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'rate.admin.inc',
'weight' => 0,
);
$menu[RATE_PATH_ADMIN_PAGE_ADD] = array(
'title' => 'Add widget',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_form',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
'weight' => 1,
);
$menu[RATE_PATH_ADMIN_PAGE_EDIT] = array(
'title' => 'Edit widget',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_form',
3,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_DELETE] = array(
'title' => 'Delete widget',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_delete_form',
3,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_TEMPLATE] = array(
'title' => 'Switch template',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_choose_template_form',
3,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_AHAH] = array(
'page callback' => 'rate_vote_ahah',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$menu[RATE_PATH_RESULTS_PAGE] = array(
'title' => 'Voting results',
'page callback' => 'rate_results_page',
'page arguments' => array(
1,
),
'access callback' => 'rate_results_page_access',
'access arguments' => array(
'view rate results page',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'file' => 'rate.results.inc',
);
$menu[RATE_PATH_LOGIN_PAGE] = array(
'title' => 'Log in',
'page callback' => 'rate_login_page',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$menu[RATE_PATH_ADMIN_PAGE_SETTINGS] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_settings_form',
),
'access arguments' => array(
'administer site settings',
),
'type' => MENU_LOCAL_TASK,
'file' => 'rate.admin.inc',
);
return $menu;
}