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

Breadcrumb

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

function Migration::getMigrationDependencies

Get the dependencies for this migration.

Return value

array The dependencies for this migration.

Overrides MigrationInterface::getMigrationDependencies

File

core/modules/migrate/src/Plugin/Migration.php, line 646

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function getMigrationDependencies() {
    if (func_num_args() > 0) {
        @trigger_error('Calling ' . __METHOD__ . ' with the $expand parameter is deprecated in drupal:11.0.0 and is removed drupal:12.0.0. See https://www.drupal.org/node/3442785', E_USER_DEPRECATED);
    }
    $this->migration_dependencies = ($this->migration_dependencies ?: []) + [
        'required' => [],
        'optional' => [],
    ];
    if (count($this->migration_dependencies) !== 2 || !is_array($this->migration_dependencies['required']) || !is_array($this->migration_dependencies['optional'])) {
        throw new InvalidPluginDefinitionException($this->id(), "Invalid migration dependencies configuration for migration {$this->id()}");
    }
    $this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process)));
    return array_map([
        $this->migrationPluginManager,
        'expandPluginIds',
    ], $this->migration_dependencies);
}
RSS feed
Powered by Drupal