You are here

public function MigrateBatchExecutable::__construct in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 src/MigrateBatchExecutable.php \Drupal\migrate_tools\MigrateBatchExecutable::__construct()

Constructs a MigrateExecutable and verifies and sets the memory limit.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration to run.

\Drupal\migrate\MigrateMessageInterface $message: (optional) The migrate message service.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: (optional) The event dispatcher.

Throws

\Drupal\migrate\MigrateException

Overrides MigrateExecutable::__construct

File

src/MigrateBatchExecutable.php, line 57

Class

MigrateBatchExecutable
Defines a migrate executable class for batch migrations through UI.

Namespace

Drupal\migrate_tools

Code

public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, array $options = []) {
  if (isset($options['update'])) {
    $this->updateExistingRows = $options['update'];
  }
  if (isset($options['force'])) {
    $this->checkDependencies = $options['force'];
  }
  if (isset($options['sync'])) {
    $this->syncSource = $options['sync'];
  }
  parent::__construct($migration, $message, $options);
  $this->migrationPluginManager = \Drupal::getContainer()
    ->get('plugin.manager.migration');
}