You are here

function _social_group_get_group_labels in Open Social 8

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

Load group content label and group label.

Return value

array array of group labels.

1 call to _social_group_get_group_labels()
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 192
The Social group module.

Code

function _social_group_get_group_labels() {

  // Load the entity label from the group content being handled.
  $group_content = \Drupal::routeMatch()
    ->getParameter('group_content')
    ->label();

  // Load group name.
  $group = \Drupal::routeMatch()
    ->getParameter('group')
    ->label();
  return [
    $group_content,
    $group,
  ];
}