Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MigrateExecutable.php

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\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;
    // 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);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal