function rate_menu in Rate 6.2
Same name and namespace in other branches
- 7.2 rate.module \rate_menu()
- 7 rate.module \rate_menu()
Implements hook_menu().
File
- ./
rate.module, line 61 - Rate module
Code
function rate_menu() {
$menu = array();
$menu[RATE_PATH_ADMIN_PAGE] = array(
'title' => t('Rate widgets'),
'description' => t('Manage rating widgets.'),
'page callback' => 'rate_admin_page',
'access arguments' => array(
'administer rate',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_LIST] = array(
'title' => t('List'),
'page callback' => 'rate_admin_page',
'access arguments' => array(
'administer rate',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'rate.admin.inc',
'weight' => 0,
);
$menu[RATE_PATH_ADMIN_PAGE_ADD] = array(
'title' => t('Add widget'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_form',
),
'access arguments' => array(
'administer rate',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
'weight' => 1,
);
$menu[RATE_PATH_ADMIN_PAGE_EDIT] = array(
'title' => t('Edit widget'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_form',
3,
),
'access arguments' => array(
'administer rate',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_DELETE] = array(
'title' => t('Delete widget'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_widget_delete_form',
3,
),
'access arguments' => array(
'administer rate',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_PAGE_TEMPLATE] = array(
'title' => t('Switch template'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rate_choose_template_form',
3,
),
'access arguments' => array(
'administer rate',
),
'type' => MENU_CALLBACK,
'file' => 'rate.admin.inc',
);
$menu[RATE_PATH_ADMIN_AHAH] = array(
'page callback' => 'rate_widget_form_ahah',
'access arguments' => array(
'administer rate',
),
'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' => t('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',
);
return $menu;
}