summaryrefslogtreecommitdiffstats
path: root/core/modules/field/tests/modules/field_test/field_test.module
diff options
context:
space:
mode:
authorAlex Pott2018-05-01 09:15:07 (GMT)
committerAlex Pott2018-05-01 09:15:07 (GMT)
commitb84b827d42512f5add026b6c930d9087c79a4b7c (patch)
treef75bcf1a9977965dd983eb5f38d0191444575e14 /core/modules/field/tests/modules/field_test/field_test.module
parent52fdfaa5f8d6bf6891a36ae03c2797750331014e (diff)
Issue #2935256 by Jo Fitzgerald, voleger, kim.pepper, ibustos, Yogesh Pawar, catch, jibran: Remove all usages of drupal_get_message and drupal_set_message in modules
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();