Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / comment / src / CommentTypeForm.php
index 0ac5b446bd556fe04ecdb183fc70e76f40107c5d..fd7125846c6a7d46287705fb5828cefc510bd3b3 100644 (file)
@@ -111,7 +111,7 @@ class CommentTypeForm extends EntityForm {
         '#default_value' => $comment_type->getTargetEntityTypeId(),
         '#title' => t('Target entity type'),
         '#options' => $options,
-        '#description' => t('The target entity type can not be changed after the comment type has been created.')
+        '#description' => t('The target entity type can not be changed after the comment type has been created.'),
       ];
     }
     else {
@@ -160,12 +160,12 @@ class CommentTypeForm extends EntityForm {
 
     $edit_link = $this->entity->link($this->t('Edit'));
     if ($status == SAVED_UPDATED) {
-      drupal_set_message(t('Comment type %label has been updated.', ['%label' => $comment_type->label()]));
+      $this->messenger()->addStatus(t('Comment type %label has been updated.', ['%label' => $comment_type->label()]));
       $this->logger->notice('Comment type %label has been updated.', ['%label' => $comment_type->label(), 'link' => $edit_link]);
     }
     else {
       $this->commentManager->addBodyField($comment_type->id());
-      drupal_set_message(t('Comment type %label has been added.', ['%label' => $comment_type->label()]));
+      $this->messenger()->addStatus(t('Comment type %label has been added.', ['%label' => $comment_type->label()]));
       $this->logger->notice('Comment type %label has been added.', ['%label' => $comment_type->label(), 'link' => $edit_link]);
     }