X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FCommentTypeForm.php;h=fd7125846c6a7d46287705fb5828cefc510bd3b3;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=0ac5b446bd556fe04ecdb183fc70e76f40107c5d;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/comment/src/CommentTypeForm.php b/web/core/modules/comment/src/CommentTypeForm.php index 0ac5b446b..fd7125846 100644 --- a/web/core/modules/comment/src/CommentTypeForm.php +++ b/web/core/modules/comment/src/CommentTypeForm.php @@ -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]); }