function og_ui_og_ui_get_group_admin in Organic groups 7.2
Same name and namespace in other branches
- 7 og_ui/og_ui.module \og_ui_og_ui_get_group_admin()
Implements hook_og_ui_get_group_admin()
File
- og_ui/
og_ui.module, line 1146 - Organic groups UI.
Code
function og_ui_og_ui_get_group_admin($group_type, $gid) {
$items = array();
$default_access = og_is_group_default_access($group_type, $gid);
if (og_user_access($group_type, $gid, 'add user')) {
$items['add_people'] = array(
'title' => t('Add people'),
'description' => t('Add group members.'),
// The final URL will be "group/$group_type/$gid/admin/people/add-user".
// @see og_ui_group_admin_overview().
'href' => 'admin/people/add-user',
);
}
if (og_user_access($group_type, $gid, 'manage members')) {
$items['people'] = array(
'title' => t('People'),
'description' => t('Manage the group members.'),
'href' => "admin/people",
);
}
if (og_user_access($group_type, $gid, 'manage roles')) {
$items['roles'] = array(
'title' => !$default_access ? t('Roles') : t('Roles (read-only)'),
'description' => !$default_access ? t('Manage the group roles.') : t('View the group roles.'),
'href' => "admin/roles",
);
}
if (og_user_access($group_type, $gid, 'manage permissions')) {
$items['permissions'] = array(
'title' => !$default_access ? t('Permissions') : t('Permissions (read-only)'),
'description' => !$default_access ? t('Manage the group permissions.') : t('View the group permissions.'),
'href' => "admin/permissions",
);
}
return $items;
}