Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldSettings.php

function FieldSettings::transform

Same name in this branch
  1. 11.1.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 24

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;
    }
    [
        $field_type,
        $global_settings,
        $original_field_type,
    ] = $value;
    return $this->getSettings($field_type, $global_settings, $original_field_type);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal