function MigrateDrupalServiceProvider::alter

Same name in other branches
  1. 9 core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php \Drupal\migrate_drupal\MigrateDrupalServiceProvider::alter()
  2. 8.9.x core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php \Drupal\migrate_drupal\MigrateDrupalServiceProvider::alter()
  3. 10 core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php \Drupal\migrate_drupal\MigrateDrupalServiceProvider::alter()

Overrides ServiceProviderBase::alter

File

core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php, line 17

Class

MigrateDrupalServiceProvider
Alters container services.

Namespace

Drupal\migrate_drupal

Code

public function alter(ContainerBuilder $container) {
    parent::alter($container);
    $container->getDefinition('plugin.manager.migration')
        ->setClass(MigrationPluginManager::class)
        ->addArgument(new Reference('plugin.manager.migrate.source'))
        ->addArgument(new Reference('config.factory'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.