summaryrefslogtreecommitdiffstats
path: root/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/field_ui/src/Form/EntityDisplayFormBase.php')
-rw-r--r--core/modules/field_ui/src/Form/EntityDisplayFormBase.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
index 04b267c..0df8e76 100644
--- a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
+++ b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
@@ -147,7 +147,7 @@ abstract class EntityDisplayFormBase extends EntityForm {
];
if (empty($field_definitions) && empty($extra_fields) && $route_info = FieldUI::getOverviewRouteInfo($this->entity->getTargetEntityTypeId(), $this->entity->getTargetBundle())) {
- drupal_set_message($this->t('There are no fields yet added. You can add new fields on the <a href=":link">Manage fields</a> page.', [':link' => $route_info->toString()]), 'warning');
+ $this->messenger()->addWarning($this->t('There are no fields yet added. You can add new fields on the <a href=":link">Manage fields</a> page.', [':link' => $route_info->toString()]));
return $form;
}
@@ -545,7 +545,7 @@ abstract class EntityDisplayFormBase extends EntityForm {
$display_mode_label = $display_modes[$mode]['label'];
$url = $this->getOverviewUrl($mode);
- drupal_set_message($this->t('The %display_mode mode now uses custom display settings. You might want to <a href=":url">configure them</a>.', ['%display_mode' => $display_mode_label, ':url' => $url->toString()]));
+ $this->messenger()->addStatus($this->t('The %display_mode mode now uses custom display settings. You might want to <a href=":url">configure them</a>.', ['%display_mode' => $display_mode_label, ':url' => $url->toString()]));
}
$statuses[$mode] = !empty($value);
}
@@ -553,7 +553,7 @@ abstract class EntityDisplayFormBase extends EntityForm {
$this->saveDisplayStatuses($statuses);
}
- drupal_set_message($this->t('Your settings have been saved.'));
+ $this->messenger()->addStatus($this->t('Your settings have been saved.'));
}
/**