Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / taxonomy / src / VocabularyForm.php
index 23e911b9a8f6724cbc94a17f7f3eee2d5846ff6d..61b3638ec24e348c126ed3d4c34e028e988a7f2a 100644 (file)
@@ -19,7 +19,7 @@ class VocabularyForm extends BundleEntityFormBase {
   /**
    * The vocabulary storage.
    *
-   * @var \Drupal\taxonomy\VocabularyStorageInterface.
+   * @var \Drupal\taxonomy\VocabularyStorageInterface
    */
   protected $vocabularyStorage;
 
@@ -89,7 +89,7 @@ class VocabularyForm extends BundleEntityFormBase {
     if ($this->moduleHandler->moduleExists('language')) {
       $form['default_terms_language'] = [
         '#type' => 'details',
-        '#title' => $this->t('Terms language'),
+        '#title' => $this->t('Term language'),
         '#open' => TRUE,
       ];
       $form['default_terms_language']['default_language'] = [
@@ -125,13 +125,13 @@ class VocabularyForm extends BundleEntityFormBase {
     $edit_link = $this->entity->link($this->t('Edit'));
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created new vocabulary %name.', ['%name' => $vocabulary->label()]));
+        $this->messenger()->addStatus($this->t('Created new vocabulary %name.', ['%name' => $vocabulary->label()]));
         $this->logger('taxonomy')->notice('Created new vocabulary %name.', ['%name' => $vocabulary->label(), 'link' => $edit_link]);
         $form_state->setRedirectUrl($vocabulary->urlInfo('overview-form'));
         break;
 
       case SAVED_UPDATED:
-        drupal_set_message($this->t('Updated vocabulary %name.', ['%name' => $vocabulary->label()]));
+        $this->messenger()->addStatus($this->t('Updated vocabulary %name.', ['%name' => $vocabulary->label()]));
         $this->logger('taxonomy')->notice('Updated vocabulary %name.', ['%name' => $vocabulary->label(), 'link' => $edit_link]);
         $form_state->setRedirectUrl($vocabulary->urlInfo('collection'));
         break;