return;
} } $fields[$this::SOURCE_IDS_HASH
] =
$this->
getSourceIdsHash($source_id_values);
$fields['level'
] =
$level;
$fields['message'
] =
$message;
$this->
getDatabase()->
insert($this->
messageTableName()) ->
fields($fields) ->
execute();
// Notify anyone listening of the message we've saved.
$this->eventDispatcher->
dispatch(new MigrateIdMapMessageEvent($this->migration,
$source_id_values,
$message,
$level), MigrateEvents::IDMAP_MESSAGE
);
} /**
* {@inheritdoc}
*/
public function getMessages(array
$source_id_values =
[],
$level = NULL
) { $query =
$this->
getDatabase()->
select($this->
messageTableName(), 'msg'
);
$condition =
sprintf('[msg].[%s] = [map].[%s]',
$this::SOURCE_IDS_HASH,
$this::SOURCE_IDS_HASH
);
$query->
addJoin('LEFT',
$this->
mapTableName(), 'map',
$condition);
// Explicitly define the fields we want. The order will be preserved: source
// IDs, destination IDs (if possible), and then the rest.