summaryrefslogtreecommitdiffstats
path: root/core/modules/config/src/Form/ConfigSingleImportForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/config/src/Form/ConfigSingleImportForm.php')
-rw-r--r--core/modules/config/src/Form/ConfigSingleImportForm.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/config/src/Form/ConfigSingleImportForm.php b/core/modules/config/src/Form/ConfigSingleImportForm.php
index 9f9a8d9..560f124 100644
--- a/core/modules/config/src/Form/ConfigSingleImportForm.php
+++ b/core/modules/config/src/Form/ConfigSingleImportForm.php
@@ -395,7 +395,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
/** @var \Drupal\Core\Config\ConfigImporter $config_importer */
$config_importer = $form_state->get('config_importer');
if ($config_importer->alreadyImporting()) {
- drupal_set_message($this->t('Another request may be importing configuration already.'), 'error');
+ $this->messenger()->addError($this->t('Another request may be importing configuration already.'));
}
else {
try {
@@ -416,9 +416,9 @@ class ConfigSingleImportForm extends ConfirmFormBase {
}
catch (ConfigImporterException $e) {
// There are validation errors.
- drupal_set_message($this->t('The configuration import failed for the following reasons:'), 'error');
+ $this->messenger()->addError($this->t('The configuration import failed for the following reasons:'));
foreach ($config_importer->getErrors() as $message) {
- drupal_set_message($message, 'error');
+ $this->messenger()->addError($message);
}
}
}