/**
* 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 {
* 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');
}
}
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());