function FieldTypeDefaults::transform
Same name in this branch
- 9 core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d6\FieldTypeDefaults::transform()
Same name in other branches
- 8.9.x core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d6\FieldTypeDefaults::transform()
- 8.9.x core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d7\FieldTypeDefaults::transform()
- 10 core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d6\FieldTypeDefaults::transform()
- 10 core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d7\FieldTypeDefaults::transform()
- 11.x core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d6\FieldTypeDefaults::transform()
- 11.x core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php \Drupal\field\Plugin\migrate\process\d7\FieldTypeDefaults::transform()
Overrides ProcessPluginBase::transform
File
-
core/
modules/ field/ src/ Plugin/ migrate/ process/ d7/ FieldTypeDefaults.php, line 21
Class
- FieldTypeDefaults
- Gives us a chance to set per field defaults.
Namespace
Drupal\field\Plugin\migrate\process\d7Code
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (is_array($value) && isset($value[1])) {
return $value[1];
}
return $value;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.