doLookup example

$migrations = $this->migrationPluginManager->createInstances($migration_id);
    if (!$migrations) {
      if (is_array($migration_id)) {
        if (count($migration_id) != 1) {
          throw new PluginException("Plugin IDs '" . implode("', '", $migration_id) . "' were not found.");
        }
        $migration_id = reset($migration_id);
      }
      throw new PluginNotFoundException($migration_id);
    }
    foreach ($migrations as $migration) {
      if ($result = $this->doLookup($migration$source_id_values)) {
        $results = array_merge($results$result);
      }
    }
    return $results;
  }

  /** * Performs a lookup. * * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration upon which to perform the lookup. * @param array $source_id_values * The source ID values to look up. * * @return array * An array of arrays of destination identifier values. * * @throws \Drupal\migrate\MigrateException * Thrown when $source_id_values contains unknown keys, or the wrong number * of keys. */
Home | Imprint | This part of the site doesn't use cookies.