public static function MigrateUpgradeDrushRunner::onIdMapMessage in Migrate Upgrade 8.3
Same name and namespace in other branches
- 8 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::onIdMapMessage()
- 8.2 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::onIdMapMessage()
Display any messages being logged to the ID map.
Parameters
\Drupal\migrate\Event\MigrateIdMapMessageEvent $event: The message event.
File
- src/
MigrateUpgradeDrushRunner.php, line 481
Class
- MigrateUpgradeDrushRunner
- Class MigrateUpgradeDrushRunner.
Namespace
Drupal\migrate_upgradeCode
public static function onIdMapMessage(MigrateIdMapMessageEvent $event) {
if ($event
->getLevel() == MigrationInterface::MESSAGE_NOTICE || $event
->getLevel() == MigrationInterface::MESSAGE_INFORMATIONAL) {
$type = 'status';
}
else {
$type = 'error';
}
$source_id_string = implode(',', $event
->getSourceIdValues());
$message = t('Source ID @source_id: @message', [
'@source_id' => $source_id_string,
'@message' => $event
->getMessage(),
]);
static::$messages
->display($message, $type);
}