X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig%2Fsrc%2FForm%2FConfigSingleImportForm.php;h=83e776c0b0c12a9bb6212cae9db8ef5217c6f54f;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=9f9a8d9281a73396679b25f58622dae58215f12b;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/config/src/Form/ConfigSingleImportForm.php b/web/core/modules/config/src/Form/ConfigSingleImportForm.php index 9f9a8d928..83e776c0b 100644 --- a/web/core/modules/config/src/Form/ConfigSingleImportForm.php +++ b/web/core/modules/config/src/Form/ConfigSingleImportForm.php @@ -62,7 +62,7 @@ class ConfigSingleImportForm extends ConfirmFormBase { /** * The configuration manager. * - * @var \Drupal\Core\Config\ConfigManagerInterface; + * @var \Drupal\Core\Config\ConfigManagerInterface */ protected $configManager; @@ -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); } } }