summaryrefslogtreecommitdiffstats
path: root/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php')
-rw-r--r--core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php b/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
index 7145b8d..a00f158 100644
--- a/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
+++ b/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
@@ -257,24 +257,24 @@ class MigrateUpgradeImportBatch {
// If we had any successes log that for the user.
if ($successes > 0) {
- drupal_set_message(\Drupal::translation()
+ \Drupal::messenger()->addStatus(\Drupal::translation()
->formatPlural($successes, 'Completed 1 upgrade task successfully', 'Completed @count upgrade tasks successfully'));
}
// If we had failures, log them and show the migration failed.
if ($failures > 0) {
- drupal_set_message(\Drupal::translation()
+ \Drupal::messenger()->addStatus(\Drupal::translation()
->formatPlural($failures, '1 upgrade failed', '@count upgrades failed'));
- drupal_set_message(t('Upgrade process not completed'), 'error');
+ \Drupal::messenger()->addError(t('Upgrade process not completed'));
}
else {
// Everything went off without a hitch. We may not have had successes
// but we didn't have failures so this is fine.
- drupal_set_message(t('Congratulations, you upgraded Drupal!'));
+ \Drupal::messenger()->addStatus(t('Congratulations, you upgraded Drupal!'));
}
if (\Drupal::moduleHandler()->moduleExists('dblog')) {
$url = Url::fromRoute('migrate_drupal_ui.log');
- drupal_set_message(Link::fromTextAndUrl(new TranslatableMarkup('Review the detailed upgrade log'), $url), $failures ? 'error' : 'status');
+ \Drupal::messenger()->addMessage(Link::fromTextAndUrl(new TranslatableMarkup('Review the detailed upgrade log'), $url), $failures ? 'error' : 'status');
}
}