function og_subgroups_is_parent_private in Subgroups for Organic groups 7.2
Determine if a group is considered a Private Parent. A Private parent will cause children groups to be private.
Parameters
$group_type:
$entity:
Return value
bool
1 call to og_subgroups_is_parent_private()
File
- ./
og_subgroups.module, line 144 - Provides users the ability to inherit permissions on subgroups.
Code
function og_subgroups_is_parent_private($group_type, $entity) {
$group_wrapper = entity_metadata_wrapper($group_type, $entity);
$result = !empty($group_wrapper->{OG_ACCESS_FIELD}) && $group_wrapper->{OG_ACCESS_FIELD}
->value();
// Allow modules to alter this result. Some groups might have different
// fields or types to determine if their privacy should affect children.
drupal_alter('og_subgroups_is_parent_private', $result, $group_type, $entity);
return $result;
}