Look for destination records.
\Drupal\migrate\Plugin\MigrationInterface $migration: The migration that should be checked.
string|string[] $value: The source ID.
array|false The array of the destination identifiers, or FALSE if destination cannot be determined.
\Drupal\migrate\MigrateException
\Drupal\migrate\MigrateSkipProcessException
protected function lookupDestination(MigrationInterface $migration, $value) {
$value = (array) $value;
$this
->skipInvalid($value);
// Break out of the loop as soon as a destination ID is found.
if ($destination_ids = $migration
->getIdMap()
->lookupDestinationIds($value)) {
$destination_ids = array_combine(array_keys($migration
->getDestinationPlugin()
->getIds()), reset($destination_ids));
return $destination_ids;
}
return FALSE;
}