You are here

function hook_profile_field_export_mapping_alter 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/social_profile_fields.api.php \hook_profile_field_export_mapping_alter()
  2. 8.8 modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.api.php \hook_profile_field_export_mapping_alter()
  3. 10.0.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.api.php \hook_profile_field_export_mapping_alter()
  4. 10.1.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.api.php \hook_profile_field_export_mapping_alter()
  5. 10.2.x modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.api.php \hook_profile_field_export_mapping_alter()

Provide a method to alter mapping from profile field to export plugin.

Parameters

array $mapping: List of export plugins and their corresponding profile fields.

1 function implements hook_profile_field_export_mapping_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

social_event_an_enroll_enrolments_export_profile_field_export_mapping_alter in modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/social_event_an_enroll_enrolments_export.module
Implements hook_profile_field_export_mapping_alter().
1 invocation of hook_profile_field_export_mapping_alter()
SocialProfileFieldsHelper::mapProfileFieldsToUserExportPlugin in modules/social_features/social_profile/modules/social_profile_fields/src/SocialProfileFieldsHelper.php
Map profile fields to user export plugins.

File

modules/social_features/social_profile/modules/social_profile_fields/social_profile_fields.api.php, line 21
Hooks provided by the social_profile_fields module.

Code

function hook_profile_field_export_mapping_alter(array &$mapping) {

  // Replace the default plugin with our own.
  $mapping['custom_user_first_name'] = $mapping['user_first_name'];

  // And unset the default.
  unset($mapping['user_first_name']);

  // Add let's add a new one.
  $mapping['custom_user_field'] = 'profile_profile_field_profile_custom';
}