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=fcb388305e9dc3823b2724b4bf33dc1f5e951acf;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/config/src/Form/ConfigSingleImportForm.php b/web/core/modules/config/src/Form/ConfigSingleImportForm.php index fcb388305..83e776c0b 100644 --- a/web/core/modules/config/src/Form/ConfigSingleImportForm.php +++ b/web/core/modules/config/src/Form/ConfigSingleImportForm.php @@ -26,6 +26,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Provides a form for importing a single configuration file. + * + * @internal */ class ConfigSingleImportForm extends ConfirmFormBase { @@ -60,7 +62,7 @@ class ConfigSingleImportForm extends ConfirmFormBase { /** * The configuration manager. * - * @var \Drupal\Core\Config\ConfigManagerInterface; + * @var \Drupal\Core\Config\ConfigManagerInterface */ protected $configManager; @@ -393,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 { @@ -414,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); } } }