summaryrefslogtreecommitdiffstats
path: root/core/modules/field/tests/modules/field_test/field_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/field/tests/modules/field_test/field_test.module')
-rw-r--r--core/modules/field/tests/modules/field_test/field_test.module5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module
index 1d7e2d6..4458672 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module
@@ -104,7 +104,8 @@ function field_test_field_widget_form_alter(&$element, FormStateInterface $form_
// Set a message if this is for the form displayed to set default value for
// the field.
if ($context['default']) {
- drupal_set_message('From hook_field_widget_form_alter(): Default form is true.');
+ \Drupal::messenger()
+ ->addStatus('From hook_field_widget_form_alter(): Default form is true.');
}
}
@@ -140,7 +141,7 @@ function _field_test_alter_widget($hook, array &$elements, FormStateInterface $f
// Set a message if this is for the form displayed to set default value for
// the field.
if ($context['default']) {
- drupal_set_message("From $hook(): Default form is true.");
+ \Drupal::messenger()->addStatus("From $hook(): Default form is true.");
}
$alter_info = \Drupal::state()->get("field_test.widget_alter_test");
$name = $context['items']->getFieldDefinition()->getName();