Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / language / src / Form / LanguageAddForm.php
index 12484079ecd8cf2bff203720ea8ce319398afff2..c0ef22b22d8af92824c8618b643f71c35c2f234a 100644 (file)
@@ -88,12 +88,12 @@ class LanguageAddForm extends LanguageFormBase {
 
     $t_args = ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()];
     $this->logger('language')->notice('The %language (%langcode) language has been created.', $t_args);
-    drupal_set_message($this->t('The language %language has been created and can now be used.', $t_args));
+    $this->messenger()->addStatus($this->t('The language %language has been created and can now be used.', $t_args));
 
     if ($this->moduleHandler->moduleExists('block')) {
       // Tell the user they have the option to add a language switcher block
       // to their theme so they can switch between the languages.
-      drupal_set_message($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the <a href=":block-admin">block administration page</a>.', [':block-admin' => $this->url('block.admin_display')]));
+      $this->messenger()->addStatus($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the <a href=":block-admin">block administration page</a>.', [':block-admin' => $this->url('block.admin_display')]));
     }
     $form_state->setRedirectUrl($this->entity->urlInfo('collection'));
   }