function MigrateExecutable::__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\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher: (optional) The event dispatcher.
File
- 
              core/
modules/ migrate/ src/ MigrateExecutable.php, line 104  
Class
- MigrateExecutable
 - Defines a migrate executable class.
 
Namespace
Drupal\migrateCode
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;
  // Record the memory limit in bytes
  $limit = trim(ini_get('memory_limit'));
  if ($limit == '-1') {
    $this->memoryLimit = PHP_INT_MAX;
  }
  else {
    $this->memoryLimit = Bytes::toNumber($limit);
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.