You are here

function uif_plus_uif_supported_fields in User Import Framework Plus 7

Implements hook_uif_supported_fields().

File

./uif_plus.module, line 232
Advanced user import from a CSV file.

Code

function uif_plus_uif_supported_fields() {
  $supported_fields = array(
    'entityreference' => array(
      'type' => 'entity',
      'label' => t('Entity reference'),
      'parser' => 'uif_plus_get_entityreference_value',
      'key' => 'target_id',
      'description' => t('entity reference (node only currently)'),
    ),
    'image' => array(
      'type' => 'entity',
      'label' => t('Image field'),
      'parser' => 'uif_plus_process_image_field',
      'key' => 'fid',
      'description' => t('image field added to a user'),
    ),
    'file' => array(
      'type' => 'entity',
      'label' => t('File field'),
      'parser' => 'uif_plus_process_file_field',
      'key' => 'fid',
      'description' => t('file field added to a user'),
    ),
    'picture' => array(
      'type' => 'core',
      'label' => t('User picture'),
      'description' => t('the user picture'),
      'parser' => 'uif_plus_process_user_picture',
    ),
    'groups' => array(
      'type' => 'og',
      'label' => t('Organic groups'),
      'description' => t('the og memberships of user'),
      'parser' => 'uif_plus_process_user_groups',
    ),
    'addressfield' => array(
      'type' => 'addressfield',
      'label' => t('Address field'),
      'description' => t('the postal address of user'),
      'parser' => 'uif_plus_process_addressfield',
    ),
  );
  $instance_fields = uif_plus_profile2_fields();
  if (count($instance_fields)) {
    foreach ($instance_fields as $field) {
      $supported_fields[$field['field_name']] = array(
        'type' => $field['entity_type'],
        'label' => $field['label'],
        'description' => $field['description'],
      );
    }
  }
  return $supported_fields;
}