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

Breadcrumb

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

function MigrationPluginManager::addDependency

Add one or more dependencies to a graph.

Parameters

array $graph: The graph so far, passed by reference.

int $id: The migration ID.

string $dependency: The dependency string.

array $dynamic_ids: The dynamic ID mapping.

1 call to MigrationPluginManager::addDependency()
MigrationPluginManager::buildDependencyMigration in core/modules/migrate/src/Plugin/MigrationPluginManager.php

File

core/modules/migrate/src/Plugin/MigrationPluginManager.php, line 228

Class

MigrationPluginManager
Plugin manager for migration plugins.

Namespace

Drupal\migrate\Plugin

Code

protected function addDependency(array &$graph, $id, $dependency, $dynamic_ids) {
    $dependencies = $dynamic_ids[$dependency] ?? [
        $dependency,
    ];
    if (!isset($graph[$id]['edges'])) {
        $graph[$id]['edges'] = [];
    }
    $graph[$id]['edges'] += array_combine($dependencies, $dependencies);
}
RSS feed
Powered by Drupal