You are here

function _social_group_inform_group_type_selection in Open Social 8.9

Same name and namespace in other branches
  1. 8.4 modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  2. 8.5 modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  3. 8.6 modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  4. 8.7 modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  5. 8.8 modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  6. 10.3.x modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  7. 10.0.x modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  8. 10.1.x modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()
  9. 10.2.x modules/social_features/social_group/social_group.module \_social_group_inform_group_type_selection()

Function that gives information to a CM+ when they edit a Group Type.

Return value

\Drupal\Core\Ajax\AjaxResponse An ajax command containing the informative text.

1 string reference to '_social_group_inform_group_type_selection'
social_group_form_alter in modules/social_features/social_group/social_group.module
Implements hook_form_alter().

File

modules/social_features/social_group/social_group.module, line 804
The Social group module.

Code

function _social_group_inform_group_type_selection() {
  $text = t('Please note that changing the group type will also change the
  visibility of the group content and the way users can join the group.');
  drupal_set_message($text, 'info');
  $alert = [
    '#type' => 'status_messages',
  ];
  $ajax_response = new AjaxResponse();
  $ajax_response
    ->addCommand(new HtmlCommand('#group-type-result', $alert));
  return $ajax_response;
}