Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / media / src / Form / MediaDeleteMultipleConfirmForm.php
index 66598873f46d461cff0dfd0b1bdc85f72e013361..6437753cd2c27a31a041e0947f827aa90a54eb26 100644 (file)
@@ -13,6 +13,12 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
 /**
  * Provides a confirmation form to delete multiple media items at once.
  *
+ * @deprecated in Drupal 8.6.x, to be removed before Drupal 9.0.0.
+ *   This route is not used in Drupal core. As an internal API, it may also be
+ *   removed in a minor release. If you are using it, copy the class
+ *   and the related "entity.media.multiple_delete_confirm" route to your
+ *   module.
+ *
  * @internal
  */
 class MediaDeleteMultipleConfirmForm extends ConfirmFormBase {
@@ -47,6 +53,7 @@ class MediaDeleteMultipleConfirmForm extends ConfirmFormBase {
    *   The entity type manager.
    */
   public function __construct(PrivateTempStoreFactory $temp_store_factory, EntityTypeManagerInterface $manager) {
+    @trigger_error(__CLASS__ . ' is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. It is not used in Drupal core. As an internal API, it may also be removed in a minor release. If you are using it, copy the class and the related "entity.media.multiple_delete_confirm" route to your module.', E_USER_DEPRECATED);
     $this->tempStoreFactory = $temp_store_factory;
     $this->storage = $manager->getStorage('media');
   }
@@ -195,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());