media.routing.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # @deprecated in Drupal 8.6.x, to be removed before Drupal 9.0.0.
  2. # This route is not used in Drupal core. As an internal API, it may also be
  3. # removed in a minor release. If you are using it, copy the class
  4. # and the related "entity.media.multiple_delete_confirm" route to your
  5. # module.
  6. entity.media.multiple_delete_confirm:
  7. path: '/admin/content/media/delete'
  8. defaults:
  9. _form: '\Drupal\media\Form\MediaDeleteMultipleConfirmForm'
  10. requirements:
  11. _permission: 'administer media+delete any media'
  12. entity.media.revision:
  13. path: '/media/{media}/revisions/{media_revision}/view'
  14. defaults:
  15. _controller: '\Drupal\Core\Entity\Controller\EntityViewController::viewRevision'
  16. _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  17. options:
  18. parameters:
  19. media:
  20. type: entity:media
  21. media_revision:
  22. type: entity_revision:media
  23. requirements:
  24. _access_media_revision: 'view'
  25. media: \d+
  26. media.oembed_iframe:
  27. path: '/media/oembed'
  28. defaults:
  29. _controller: '\Drupal\media\Controller\OEmbedIframeController::render'
  30. requirements:
  31. _permission: 'view media'
  32. media.settings:
  33. path: '/admin/config/media/media-settings'
  34. defaults:
  35. _form: '\Drupal\media\Form\MediaSettingsForm'
  36. _title: 'Media settings'
  37. requirements:
  38. _permission: 'administer media'
  39. media.filter.preview:
  40. path: '/media/{filter_format}/preview'
  41. defaults:
  42. _controller: '\Drupal\media\Controller\MediaFilterController::preview'
  43. methods: [GET]
  44. requirements:
  45. _entity_access: 'filter_format.use'
  46. _custom_access: '\Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter'
  47. editor.media_dialog:
  48. path: '/editor/dialog/media/{editor}'
  49. defaults:
  50. _form: '\Drupal\media\Form\EditorMediaDialog'
  51. _title: 'Edit media'
  52. methods: [POST]
  53. requirements:
  54. _entity_access: 'editor.use'