Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / language / src / Form / NegotiationConfigureForm.php
index 325a4351b01d913392731ff14d630f5957709353..0b22bc70a496f4598181114aee20cccba50e1184 100644 (file)
@@ -3,7 +3,6 @@
 namespace Drupal\language\Form;
 
 use Drupal\Core\Block\BlockManagerInterface;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Extension\ThemeHandlerInterface;
@@ -204,7 +203,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
     $this->blockManager->clearCachedDefinitions();
 
     $form_state->setRedirect('language.negotiation');
-    drupal_set_message($this->t('Language detection configuration saved.'));
+    $this->messenger()->addStatus($this->t('Language detection configuration saved.'));
   }
 
   /**
@@ -236,7 +235,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
         '#attributes' => ['class' => ['language-customization-checkbox']],
         '#attached' => [
           'library' => [
-            'language/drupal.language.admin'
+            'language/drupal.language.admin',
           ],
         ],
       ];
@@ -276,7 +275,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
 
         $table_form['weight'][$method_id] = [
           '#type' => 'weight',
-          '#title' => $this->t('Weight for @title language detection method', ['@title' => Unicode::strtolower($method_name)]),
+          '#title' => $this->t('Weight for @title language detection method', ['@title' => mb_strtolower($method_name)]),
           '#title_display' => 'invisible',
           '#default_value' => $weight,
           '#attributes' => ['class' => ["language-method-weight-$type"]],
@@ -287,7 +286,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
 
         $table_form['enabled'][$method_id] = [
           '#type' => 'checkbox',
-          '#title' => $this->t('Enable @title language detection method', ['@title' => Unicode::strtolower($method_name)]),
+          '#title' => $this->t('Enable @title language detection method', ['@title' => mb_strtolower($method_name)]),
           '#title_display' => 'invisible',
           '#default_value' => $enabled,
         ];