function FieldSettings::transform

Same name in this branch
  1. 8.9.x core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php \Drupal\field\Plugin\migrate\process\d7\FieldSettings::transform()
Same name in other branches
  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()
  3. 10 core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php \Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform()
  4. 10 core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php \Drupal\field\Plugin\migrate\process\d7\FieldSettings::transform()
  5. 11.x core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php \Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform()
  6. 11.x core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php \Drupal\field\Plugin\migrate\process\d7\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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.