MigrateDrupalServiceProvider.php

Same filename in other branches
  1. 8.9.x core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php
  2. 10 core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php
  3. 11.x core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php

Namespace

Drupal\migrate_drupal

File

core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php

View source
<?php

namespace Drupal\migrate_drupal;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
use Symfony\Component\DependencyInjection\Reference;

/**
 * Alters container services.
 */
class MigrateDrupalServiceProvider extends ServiceProviderBase {
    
    /**
     * {@inheritdoc}
     */
    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'));
    }

}

Classes

Title Deprecated Summary
MigrateDrupalServiceProvider Alters container services.

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