function referral_menu in User Referral 7
Same name and namespace in other branches
- 5 referral.module \referral_menu()
- 6 referral.module \referral_menu()
Implements hook_menu().
File
- ./
referral.module, line 59 - The referral module.
Code
function referral_menu() {
$items = array();
$items['admin/config/people/referral'] = array(
'title' => 'User Referral',
'description' => 'Settings for the User Referral module.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'referral_settings',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
);
$items['referral'] = array(
'page callback' => 'referral_get',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
// TODO: Views for this page is at 'my-referrals'. Redirect to the views page.
$items['referral/view'] = array(
'title' => 'Your Referrals',
'page callback' => 'referral_view',
'access arguments' => array(
'use referral',
),
'type' => MENU_SUGGESTED_ITEM,
);
// TODO: Replace with views
$items['admin/reports/referral'] = array(
'title' => 'Referrals summary',
'description' => 'Admin reports for the User Referral module.',
'page callback' => 'referral_admin_view_summary',
'access arguments' => array(
'administer referral',
),
'type' => MENU_NORMAL_ITEM,
);
// TODO: Replace with views
$items['admin/reports/referral/summary'] = array(
'title' => 'Referrals summary',
'page callback' => 'referral_admin_view_summary',
'access arguments' => array(
'administer referral',
),
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
// TODO: Replace with views
$items['admin/reports/referral/details'] = array(
'page callback' => 'referral_admin_view_details',
'access arguments' => array(
'administer referral',
),
'weight' => 2,
'type' => MENU_CALLBACK,
);
// TODO: Replace with views
$items['admin/reports/referral/unflagged'] = array(
'title' => 'Unflagged referrals',
'page callback' => 'referral_admin_view_unflagged',
'access arguments' => array(
'administer referral',
),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
// TODO: Replace with views
$items['admin/reports/referral/roles'] = array(
'title' => 'Referral roles',
'page callback' => 'referral_admin_view_roles',
'access arguments' => array(
'administer referral',
),
'type' => MENU_CALLBACK,
);
$items['admin/referral/flag'] = array(
'page callback' => 'referral_admin_flag',
'access arguments' => array(
'administer referral',
),
'type' => MENU_CALLBACK,
);
return $items;
}