function FieldPluginBase::alterFieldFormatterMigration
Same name in other branches
- 9 core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldFormatterMigration()
- 10 core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldFormatterMigration()
- 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldFormatterMigration()
Overrides MigrateFieldInterface::alterFieldFormatterMigration
1 call to FieldPluginBase::alterFieldFormatterMigration()
- FieldPluginBase::processFieldFormatter in core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ field/ FieldPluginBase.php - Alter field formatter migration.
File
-
core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ field/ FieldPluginBase.php, line 138
Class
- FieldPluginBase
- The base class for all field plugins.
Namespace
Drupal\migrate_drupal\Plugin\migrate\fieldCode
public function alterFieldFormatterMigration(MigrationInterface $migration) {
$process = [];
// Some migrate field plugin IDs are prefixed with 'd6_' or 'd7_'. Since the
// plugin ID is used in the static map as the module name, we have to remove
// this prefix from the plugin ID.
$plugin_id = preg_replace('/d[67]_/', '', $this->pluginId);
foreach ($this->getFieldFormatterMap() as $source_format => $destination_format) {
$process[0]['map'][$plugin_id][$source_format] = $destination_format;
}
$migration->mergeProcessOfProperty('options/type', $process);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.