Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / config_translation / src / Controller / ConfigTranslationController.php
index a8c426ae0e64f383bce6d1e29dc3229c8af00a55..b4d335656915a8b23861b31d88a5d13bf39804bc 100644 (file)
@@ -139,7 +139,7 @@ class ConfigTranslationController extends ControllerBase {
 
     $languages = $this->languageManager->getLanguages();
     if (count($languages) == 1) {
-      drupal_set_message($this->t('In order to translate configuration, the website must have at least two <a href=":url">languages</a>.', [':url' => $this->url('entity.configurable_language.collection')]), 'warning');
+      $this->messenger()->addWarning($this->t('In order to translate configuration, the website must have at least two <a href=":url">languages</a>.', [':url' => $this->url('entity.configurable_language.collection')]));
     }
 
     try {
@@ -162,7 +162,7 @@ class ConfigTranslationController extends ControllerBase {
           '#items' => $items,
         ],
       ];
-      drupal_set_message($this->renderer->renderPlain($message), 'warning');
+      $this->messenger()->addWarning($this->renderer->renderPlain($message));
 
       $original_langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED;
       $operations_access = FALSE;