Skip to content

Instantly share code, notes, and snippets.

@chx
chx / gist:97fc107ee2a968628636
Last active January 22, 2016 15:23 — forked from edysmp/gist:24f0a13c3d4834dbe514
lookupDestinationId
// When looking up the destination ID we require an array with both the
// source key and value, e.g. ['nid' => 41]. In this case, $source_id_values need to be ordered the same
// order as $this->sourceIdFields(). However, the Migration process
// plugin doesn't currently have a way to get the source key so we presume
// the values have been passed through in the correct order.
if (!isset($source_id_values[0])) {
$source_id_values = array_intersect_key($this->sourceIdFields(), $source_id_values);
}