function og_invite_people_menu in OG Invite People 7.2
Same name and namespace in other branches
- 7 og_invite_people.module \og_invite_people_menu()
Implements hook_menu().
File
- ./
og_invite_people.module, line 12 - OG Invite People
Code
function og_invite_people_menu() {
$items = array();
$items['admin/config/group/og-invite-people'] = array(
'title' => 'OG invite people settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'og_invite_people_settings_form',
),
'access arguments' => array(
'administer og_invite_people',
),
'file' => 'og_invite_people.admin.inc',
);
$items['group/%/%/admin/people/invite'] = array(
'title' => 'Invite People',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'_og_invite_people_new_users_form',
1,
2,
),
'type' => MENU_LOCAL_TASK,
'weight' => 4,
'access callback' => 'og_invite_people_user_access_group',
'access arguments' => array(
'invite people',
1,
2,
),
'file' => 'og_invite_people.form.inc',
);
$add_invite_tab = variable_get('og_invite_people_add_invite_tab', 0);
if ($add_invite_tab) {
foreach (og_get_all_group_entity() as $entity_type => $value) {
if ($entity_type == 'taxonomy_term') {
$path = 'taxonomy/term/%/invite';
$argument = 2;
}
else {
$path = "{$entity_type}/%/invite";
$argument = 1;
}
$items[$path] = array(
'page callback' => 'drupal_get_form',
'title' => 'Invite People',
'page arguments' => array(
'_og_invite_people_new_users_form',
$entity_type,
$argument,
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'access callback' => 'og_invite_people_user_access_group',
'access arguments' => array(
'invite people',
$entity_type,
$argument,
),
'file' => 'og_invite_people.form.inc',
);
}
}
return $items;
}