You are here

public function FileEntity::alterFieldInstanceMigration in Media Migration 8

Apply any custom processing to the field instance migration.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.

Overrides FieldPluginBase::alterFieldInstanceMigration

File

src/Plugin/migrate/field/FileEntity.php, line 41

Class

FileEntity
Field Plugin for file_entity to media migrations.

Namespace

Drupal\media_migration\Plugin\migrate\field

Code

public function alterFieldInstanceMigration(MigrationInterface $migration) {
  $settings = [
    'file_entity' => [
      'plugin' => 'file_entity_field_instance_settings',
    ],
  ];
  $migration
    ->mergeProcessOfProperty('settings', $settings);

  // @todo In Drupal 7, when no media types are explicitly enabled on this
  // field, that means that every media type is allowed. For handling these
  // cases we have to make this migration depend on the media type migrations.
  // @see \Drupal\media_migration\Plugin\migrate\process\FileEntityFieldInstanceSettings::transform()
  parent::alterFieldInstanceMigration($migration);
}