Mercurial > hg > isophonics-drupal-site
diff core/modules/block_content/src/BlockContentForm.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children | af1871eacc83 |
line wrap: on
line diff
--- a/core/modules/block_content/src/BlockContentForm.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/modules/block_content/src/BlockContentForm.php Thu Feb 28 13:21:36 2019 +0000 @@ -54,11 +54,11 @@ if ($insert) { $logger->notice('@type: added %info.', $context); - drupal_set_message($this->t('@type %info has been created.', $t_args)); + $this->messenger()->addStatus($this->t('@type %info has been created.', $t_args)); } else { $logger->notice('@type: updated %info.', $context); - drupal_set_message($this->t('@type %info has been updated.', $t_args)); + $this->messenger()->addStatus($this->t('@type %info has been updated.', $t_args)); } if ($block->id()) { @@ -83,7 +83,7 @@ else { // In the unlikely case something went wrong on save, the block will be // rebuilt and block form redisplayed. - drupal_set_message($this->t('The block could not be saved.'), 'error'); + $this->messenger()->addError($this->t('The block could not be saved.')); $form_state->setRebuild(); } }