function ggroup_add_subgroup_access in Group 7
Access callback for group/%group/subgroup/add/%group_type.
1 string reference to 'ggroup_add_subgroup_access'
- ggroup_menu in modules/
ggroup/ ggroup.router.inc - Implements hook_menu().
File
- modules/
ggroup/ ggroup.router.inc, line 78 - Contains all router functions for the Subgroup module.
Code
function ggroup_add_subgroup_access($group, $group_type) {
if (empty($group_type)) {
return FALSE;
}
// Check if the parent group supports subgroups of this type.
$parent_type = group_type_load($group->type);
if (!isset($parent_type->config['subgroup'][$group_type->name])) {
return FALSE;
}
return group_access("create {$group_type->name} group", $group);
}