You are here

function hook_social_group_allowed_visibilities_alter in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  2. 8.6 modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  3. 8.7 modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  4. 8.8 modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  5. 10.0.x modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  6. 10.1.x modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()
  7. 10.2.x modules/social_features/social_group/social_group.api.php \hook_social_group_allowed_visibilities_alter()

Provide a method to alter the allowed content visibility for a group type.

Parameters

array $visibilities: The visibilities list.

string $group_type_id: The group type we alter the visibility setting for.

See also

social_group_get_allowed_visibility_options_per_group_type()

1 function implements hook_social_group_allowed_visibilities_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_allowed_visibilities_alter in modules/social_features/social_group/modules/social_group_secret/social_group_secret.module
Implements hook_social_group_allowed_visibilities_alter().
1 invocation of hook_social_group_allowed_visibilities_alter()
social_group_get_allowed_visibility_options_per_group_type in modules/social_features/social_group/social_group.module
Get the allowed visibility options for a given group type.

File

modules/social_features/social_group/social_group.api.php, line 81
Hooks provided by the Social Group module.

Code

function hook_social_group_allowed_visibilities_alter(array &$visibilities, $group_type_id) {
  if ($group_type_id === 'custom_public_group') {
    $visibilities['community'] = TRUE;
  }
}