summaryrefslogtreecommitdiffstats
path: root/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/field_ui/src/Form/FieldConfigDeleteForm.php')
-rw-r--r--core/modules/field_ui/src/Form/FieldConfigDeleteForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php b/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php
index ab83e8f..efdecbf 100644
--- a/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php
+++ b/core/modules/field_ui/src/Form/FieldConfigDeleteForm.php
@@ -98,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());