MigrateDrupalServiceProvider.php 663 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?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'));
  }

}