function hook_social_group_default_visibility_alter in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 8.4 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 8.5 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 8.6 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 8.7 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 8.8 modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 10.3.x modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 10.0.x modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
- 10.1.x modules/social_features/social_group/social_group.api.php \hook_social_group_default_visibility_alter()
Provide a method to alter the default content visibility for a group type.
Parameters
string $visibility: The visibility option that is default.
string $group_type_id: The group type we alter the visibility setting for.
1 function implements hook_social_group_default_visibility_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- social_group_secret_social_group_default_visibility_alter in modules/
social_features/ social_group/ modules/ social_group_secret/ social_group_secret.module - Implements hook_social_group_default_visibility_alter().
1 invocation of hook_social_group_default_visibility_alter()
- SocialGroupHelperService::getDefaultGroupVisibility in modules/
social_features/ social_group/ src/ SocialGroupHelperService.php - Returns the default visibility.
File
- modules/
social_features/ social_group/ social_group.api.php, line 50 - Hooks provided by the Social Group module.
Code
function hook_social_group_default_visibility_alter(&$visibility, $group_type_id) {
switch ($group_type_id) {
case 'custom_public_group':
$visibility = 'public';
break;
case 'custom_open_group':
$visibility = 'community';
break;
case 'custom_closed_group':
$visibility = 'group';
break;
}
}