function invite_menu in Invite 6.2
Same name and namespace in other branches
- 5.2 invite.module \invite_menu()
- 5 invite.module \invite_menu()
- 7.4 invite.module \invite_menu()
- 7.2 invite.module \invite_menu()
Implementation of hook_menu().
File
- ./
invite.module, line 112 - Allows your users to send and track invitations to join your site.
Code
function invite_menu() {
// Admin menu items
$items['admin/user/invite'] = array(
'title' => 'Invites',
'page callback' => 'invite_admin_overview',
'access arguments' => array(
'administer invitations',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'invite_admin.inc',
);
$items['admin/user/invite/list'] = array(
'title' => 'Inviters',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/user/invite/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_settings',
),
'access arguments' => array(
'administer invitations',
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'file' => 'invite_admin.inc',
);
$items['admin/user/invite/details/%user'] = array(
'title callback' => 'invite_admin_details_page_title',
'title arguments' => array(
4,
),
'page callback' => 'invite_admin_details',
'page arguments' => array(
4,
),
'access arguments' => array(
'administer invitations',
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite_admin.inc',
);
// Frontend menu items
$items['invite'] = array(
'title' => 'Invite a friend',
'title callback' => 'invite_page_title',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_form',
'page',
array(),
),
'access arguments' => array(
'send invitations',
),
'type' => MENU_NORMAL_ITEM,
);
$items['invite/accept/%invite'] = array(
'page callback' => 'invite_accept',
'page arguments' => array(
2,
),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items['invite/withdraw/%invite'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_cancel',
2,
),
'access arguments' => array(
'track invitations',
),
'type' => MENU_CALLBACK,
);
$items['invite/resend/%invite'] = array(
'title' => 'Resend invitation',
'page callback' => 'invite_resend',
'page arguments' => array(
2,
),
'access arguments' => array(
'send invitations',
),
'type' => MENU_CALLBACK,
);
// User profile tabs
$items['user/%user/invites'] = array(
'title' => 'Invitations',
'page callback' => 'invite_user_overview',
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite_admin.inc',
);
$items['user/%user/invites/accepted'] = array(
'title' => 'Accepted',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'accepted',
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -5,
'file' => 'invite_admin.inc',
);
$items['user/%user/invites/pending'] = array(
'title' => 'Pending',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'pending',
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite_admin.inc',
);
$items['user/%user/invites/expired'] = array(
'title' => 'Expired',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'expired',
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'file' => 'invite_admin.inc',
);
$items['user/%user/invites/new'] = array(
'title' => 'New invitation',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_form',
'page',
array(),
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'send invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
return $items;
}