function referral_menu in User Referral 5
Same name and namespace in other branches
- 6 referral.module \referral_menu()
- 7 referral.module \referral_menu()
File
- ./
referral.module, line 35
Code
function referral_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/referral',
'title' => t('User Referral'),
'description' => t('Settings for the User Referral module.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'referral_settings',
),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'referral',
'callback' => 'referral_get',
'access' => TRUE,
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'referral/view',
'callback' => 'referral_view',
'title' => t('Your Referrals'),
'access' => user_access(REFERRAL_PERM_USE),
'type' => MENU_SUGGESTED_ITEM,
);
$items[] = array(
'path' => 'admin/logs/referral',
'title' => t('Referral'),
'callback' => 'referral_admin_view_summary',
'access' => user_access(REFERRAL_PERM_ADMIN),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/logs/referral/summary',
'title' => t('Summary'),
'callback' => 'referral_admin_view_summary',
'access' => user_access(REFERRAL_PERM_ADMIN),
'weight' => 1,
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/logs/referral/details',
'callback' => 'referral_admin_view_details',
'access' => user_access(REFERRAL_PERM_ADMIN),
'weight' => 2,
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/logs/referral/unflagged',
'title' => t('Unflagged'),
'callback' => 'referral_admin_view_unflagged',
'access' => user_access(REFERRAL_PERM_ADMIN),
'weight' => 3,
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/logs/referral/roles',
'title' => t('Roles'),
'callback' => 'referral_admin_view_roles',
'access' => user_access(REFERRAL_PERM_ADMIN),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/referral/flag',
'callback' => 'referral_admin_flag',
'access' => user_access(REFERRAL_PERM_ADMIN),
'type' => MENU_CALLBACK,
);
}
return $items;
}