You are here

public function SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  2. 8.3 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  3. 8.4 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  4. 8.5 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  5. 8.6 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  6. 8.7 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  7. 8.8 modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  8. 10.0.x modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  9. 10.1.x modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
  10. 10.2.x modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php \Drupal\social_profile_fields\SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()

Map profile fields to user export plugins.

Return value

array An array of fields and user export plugins.

1 call to SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin()
SocialProfileFieldsHelper::getUserExportPluginIdForField in modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php
Get the user export plugin ids for a given field.

File

modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php, line 101

Class

SocialProfileFieldsHelper
Defines the helper service.

Namespace

Drupal\social_profile_fields

Code

public function mapProfileFieldsToUserExportPlugin() {
  $mapping = [
    'user_first_name' => 'profile_profile_field_profile_first_name',
    'user_last_name' => 'profile_profile_field_profile_last_name',
    'user_address_country_code' => 'profile_profile_field_profile_address',
    'user_address_administrative' => 'profile_profile_field_profile_address',
    'user_address_locality' => 'profile_address_field_city',
    'user_address_postal_code' => 'profile_address_field_postalcode',
    'user_address_administrative_area' => 'profile_address_field_administrative_area',
    'user_address_line1' => 'profile_address_field_address',
    'user_address_line2' => 'profile_profile_field_profile_address',
    'user_phone_number' => 'profile_profile_field_profile_phone_number',
    'user_nationality' => 'profile_profile_field_profile_nationality',
    'user_organization' => 'profile_profile_field_profile_organization',
    'user_function' => 'profile_profile_field_profile_function',
    'user_skills' => 'profile_profile_field_profile_expertise',
    'user_interests' => 'profile_profile_field_profile_interests',
    'user_profile_tag' => 'profile_profile_field_profile_profile_tag',
    'user_nickname' => 'profile_profile_field_profile_nick_name',
  ];

  // Allow other modules to alter the mapping.
  $this->moduleHandler
    ->alter('profile_field_export_mapping', $mapping);
  return $mapping;
}