expandPluginIds example



    $factory = $this->getFactory();
    $migration_ids = (array) $migration_id;

    // We need to expand any derivative migrations. Derivative migrations are     // calculated by migration derivers such as D6NodeDeriver. This allows     // migrations to depend on the base id and then have a dependency on all     // derivative migrations. For example, d6_comment depends on d6_node but     // after we've expanded the dependencies it will depend on d6_node:page,     // d6_node:story and so on, for other derivative migrations.     $plugin_ids = $this->expandPluginIds($migration_ids);

    $instances = [];
    foreach ($plugin_ids as $plugin_id) {
      $instances[$plugin_id] = $factory->createInstance($plugin_id$configuration[$plugin_id] ?? []);
    }

    // @todo Remove loop when the ability to call ::getMigrationDependencies()     // without expanding plugins is removed.     foreach ($instances as $migration) {
      $migration->set('migration_dependencies', $migration->getMigrationDependencies(TRUE));
    }

    
Home | Imprint | This part of the site doesn't use cookies.