Mercurial > hg > cmmr2012-drupal-site
diff core/modules/block_content/src/BlockContentForm.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/core/modules/block_content/src/BlockContentForm.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/block_content/src/BlockContentForm.php Thu Feb 28 13:11:55 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(); } }