function MigrateExecutable::__construct

Constructs a MigrateExecutable.

Parameters

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

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

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

File

core/modules/migrate/src/MigrateExecutable.php, line 88

Class

MigrateExecutable
Defines a migrate executable class.

Namespace

Drupal\migrate

Code

public function __construct(MigrationInterface $migration, ?MigrateMessageInterface $message = NULL, ?EventDispatcherInterface $event_dispatcher = NULL) {
  $this->migration = $migration;
  $this->message = $message ?: new MigrateMessage();
  $this->getIdMap()
    ->setMessage($this->message);
  $this->eventDispatcher = $event_dispatcher;
}

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