You are here

public function FieldSettings::transform in Drupal 9

Same name in this branch
  1. 9 core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php \Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform()
  2. 9 core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php \Drupal\field\Plugin\migrate\process\d7\FieldSettings::transform()
Same name and namespace in other branches
  1. 8 core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php \Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform()
  2. 10 core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php \Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform()

Get the field default/mapped settings.

Overrides ProcessPluginBase::transform

File

core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php, line 23

Class

FieldSettings
Get the field settings.

Namespace

Drupal\field\Plugin\migrate\process\d6

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {

  // To maintain backwards compatibility, ensure that $value contains at least
  // three elements.
  if (count($value) == 2) {
    $value[] = NULL;
  }
  list($field_type, $global_settings, $original_field_type) = $value;
  return $this
    ->getSettings($field_type, $global_settings, $original_field_type);
}