public function LinkField::alterFieldInstanceMigration in Drupal 9
Same name and namespace in other branches
- 8 core/modules/link/src/Plugin/migrate/field/d7/LinkField.php \Drupal\link\Plugin\migrate\field\d7\LinkField::alterFieldInstanceMigration()
Apply any custom processing to the field instance migration.
Parameters
\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.
Overrides FieldPluginBase::alterFieldInstanceMigration
File
- core/
modules/ link/ src/ Plugin/ migrate/ field/ d7/ LinkField.php, line 55
Class
- LinkField
- @MigrateField( id = "link_field", core = {7}, type_map = { "link_field" = "link" }, source_module = "link", destination_module = "link" )
Namespace
Drupal\link\Plugin\migrate\field\d7Code
public function alterFieldInstanceMigration(MigrationInterface $migration) {
$process = [
'plugin' => 'static_map',
'source' => 'settings/title',
'bypass' => TRUE,
'map' => [
'disabled' => DRUPAL_DISABLED,
'optional' => DRUPAL_OPTIONAL,
'required' => DRUPAL_REQUIRED,
],
];
$migration
->mergeProcessOfProperty('settings/title', $process);
}