public function Sql::lookupDestinationId in Drupal 8
Looks up the destination identifier corresponding to a source key.
Given a (possibly multi-field) source identifier value, return the (possibly multi-field) destination identifier value it is mapped to.
Parameters
array $source_id_values: The source identifier keyed values of the record, e.g. ['nid' => 5].
Return value
array The destination identifier values of the record, or empty on failure.
Overrides MigrateIdMapInterface::lookupDestinationId
Deprecated
in drupal:8.1.0 and is removed from drupal:9.0.0. Use lookupDestinationIds() instead.
See also
https://www.drupal.org/node/2725809
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php, line 548
Class
- Sql
- Defines the sql based ID map implementation.
Namespace
Drupal\migrate\Plugin\migrate\id_mapCode
public function lookupDestinationId(array $source_id_values) {
@trigger_error(__NAMESPACE__ . '\\Sql::lookupDestinationId() is deprecated in drupal:8.1.0 and is removed from drupal:9.0.0. Use Sql::lookupDestinationIds() instead. See https://www.drupal.org/node/2725809', E_USER_DEPRECATED);
$results = $this
->lookupDestinationIds($source_id_values);
return $results ? reset($results) : [];
}