You are here

function _social_user_export_get_groups in Open Social 8.2

Same name and namespace in other branches
  1. 8 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_groups()
  2. 8.3 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_groups()
  3. 8.4 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_groups()

Returns array with titles of all groups.

1 call to _social_user_export_get_groups()
social_user_export_form_alter in modules/social_features/social_user_export/social_user_export.module
Implements hook_form_alter().

File

modules/social_features/social_user_export/social_user_export.module, line 300
The Social User Export module.

Code

function _social_user_export_get_groups() {
  $data =& drupal_static(__FUNCTION__);
  if (empty($data)) {
    $data = \Drupal::database()
      ->select('groups_field_data', 'gfd')
      ->fields('gfd', [
      'id',
      'label',
    ])
      ->execute()
      ->fetchAllKeyed(0, 1);
  }
  return $data;
}