X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffield_ui%2Fsrc%2FForm%2FFieldConfigDeleteForm.php;h=efdecbfbfc5104453e9e03410e7402fb029e7f74;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=67782311bc44ec5cd2cef4fc5a4fae048a6c6c1e;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php b/web/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php index 67782311b..efdecbfbf 100644 --- a/web/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php +++ b/web/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php @@ -12,6 +12,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides a form for removing a field from a bundle. + * + * @internal */ class FieldConfigDeleteForm extends EntityDeleteForm { @@ -96,10 +98,10 @@ class FieldConfigDeleteForm extends EntityDeleteForm { if ($field_storage && !$field_storage->isLocked()) { $this->entity->delete(); - drupal_set_message($this->t('The field %field has been deleted from the %type content type.', ['%field' => $this->entity->label(), '%type' => $bundle_label])); + $this->messenger()->addStatus($this->t('The field %field has been deleted from the %type content type.', ['%field' => $this->entity->label(), '%type' => $bundle_label])); } else { - drupal_set_message($this->t('There was a problem removing the %field from the %type content type.', ['%field' => $this->entity->label(), '%type' => $bundle_label]), 'error'); + $this->messenger()->addError($this->t('There was a problem removing the %field from the %type content type.', ['%field' => $this->entity->label(), '%type' => $bundle_label])); } $form_state->setRedirectUrl($this->getCancelUrl());