summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/NodeTypeForm.php
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/node/src/NodeTypeForm.php
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/node/src/NodeTypeForm.php')
-rw-r--r--core/modules/node/src/NodeTypeForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php
index 9eec40c..148c1ff 100644
--- a/core/modules/node/src/NodeTypeForm.php
+++ b/core/modules/node/src/NodeTypeForm.php
@@ -225,11 +225,11 @@ class NodeTypeForm extends BundleEntityFormBase {
$t_args = ['%name' => $type->label()];
if ($status == SAVED_UPDATED) {
- drupal_set_message(t('The content type %name has been updated.', $t_args));
+ $this->messenger()->addStatus($this->t('The content type %name has been updated.', $t_args));
}
elseif ($status == SAVED_NEW) {
node_add_body_field($type);
- drupal_set_message(t('The content type %name has been added.', $t_args));
+ $this->messenger()->addStatus($this->t('The content type %name has been added.', $t_args));
$context = array_merge($t_args, ['link' => $type->link($this->t('View'), 'collection')]);
$this->logger('node')->notice('Added content type %name.', $context);
}