summaryrefslogtreecommitdiffstats
path: root/core/modules/media
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/media')
-rw-r--r--core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php2
-rw-r--r--core/modules/media/src/MediaForm.php4
-rw-r--r--core/modules/media/src/MediaTypeForm.php4
3 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php b/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
index 2d6850b..6437753 100644
--- a/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
+++ b/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
@@ -202,7 +202,7 @@ class MediaDeleteMultipleConfirmForm extends ConfirmFormBase {
}
if ($total_count) {
- drupal_set_message($this->formatPlural($total_count, 'Deleted 1 media item.', 'Deleted @count media items.'));
+ $this->messenger()->addStatus($this->formatPlural($total_count, 'Deleted 1 media item.', 'Deleted @count media items.'));
}
$this->tempStoreFactory->get('media_multiple_delete_confirm')->delete(\Drupal::currentUser()->id());
diff --git a/core/modules/media/src/MediaForm.php b/core/modules/media/src/MediaForm.php
index dd6b3fd..6f860e2 100644
--- a/core/modules/media/src/MediaForm.php
+++ b/core/modules/media/src/MediaForm.php
@@ -65,11 +65,11 @@ class MediaForm extends ContentEntityForm {
if ($saved === SAVED_NEW) {
$logger->notice('@type: added %label.', $context);
- drupal_set_message($this->t('@type %label has been created.', $t_args));
+ $this->messenger()->addStatus($this->t('@type %label has been created.', $t_args));
}
else {
$logger->notice('@type: updated %label.', $context);
- drupal_set_message($this->t('@type %label has been updated.', $t_args));
+ $this->messenger()->addStatus($this->t('@type %label has been updated.', $t_args));
}
$form_state->setRedirectUrl($this->entity->toUrl('canonical'));
diff --git a/core/modules/media/src/MediaTypeForm.php b/core/modules/media/src/MediaTypeForm.php
index 0ba5ee5..4994480 100644
--- a/core/modules/media/src/MediaTypeForm.php
+++ b/core/modules/media/src/MediaTypeForm.php
@@ -369,10 +369,10 @@ class MediaTypeForm extends EntityForm {
$t_args = ['%name' => $media_type->label()];
if ($status === SAVED_UPDATED) {
- drupal_set_message($this->t('The media type %name has been updated.', $t_args));
+ $this->messenger()->addStatus($this->t('The media type %name has been updated.', $t_args));
}
elseif ($status === SAVED_NEW) {
- drupal_set_message($this->t('The media type %name has been added.', $t_args));
+ $this->messenger()->addStatus($this->t('The media type %name has been added.', $t_args));
$this->logger('media')->notice('Added media type %name.', $t_args);
}