You are here

video_transcode.routing.yml in Video 8.2

modules/video_transcode/video_transcode.routing.yml

File

modules/video_transcode/video_transcode.routing.yml
View source
  1. # Route name can be used in several places; e.g. links, redirects, and local
  2. # actions.
  3. entity.video_transcode_job.canonical:
  4. path: '/admin/config/media/transcode-jobs/{video_transcode_job}'
  5. defaults:
  6. # Calls the view controller, defined in the annotation of the transcode job entity
  7. _entity_view: 'video_transcode_job'
  8. _title: 'Video job content'
  9. requirements:
  10. # Calls the access controller of the entity, $operation 'view'
  11. _entity_access: 'video_transcode_job.view'
  12. entity.video_transcode_job.collection:
  13. path: '/admin/config/media/transcode-jobs/list'
  14. defaults:
  15. # Calls the list controller, defined in the annotation of the transcode job entity.
  16. _entity_list: 'video_transcode_job'
  17. _title: 'Video jobs'
  18. requirements:
  19. # Checks for permission directly.
  20. _permission: 'view transcode job entity'
  21. video_transcode.add_transcode_job:
  22. path: '/admin/config/media/transcode-jobs/add'
  23. defaults:
  24. # Calls the form.add controller, defined in the transcode job entity.
  25. _entity_form: video_transcode_job.add
  26. _title: 'Add video job'
  27. requirements:
  28. _entity_create_access: 'video_transcode_job'
  29. entity.video_transcode_job.edit_form:
  30. path: '/admin/config/media/transcode-jobs/{video_transcode_job}/edit'
  31. defaults:
  32. # Calls the form.edit controller, defined in the transcode job entity.
  33. _entity_form: video_transcode_job.edit
  34. _title: 'Edit video job'
  35. requirements:
  36. _entity_access: 'video_transcode_job.edit'
  37. entity.video_transcode_job.delete_form:
  38. path: '/admin/config/media/transcode-jobs/{video_transcode_job}/delete'
  39. defaults:
  40. # Calls the form.delete controller, defined in the transcode job entity.
  41. _entity_form: video_transcode_job.delete
  42. _title: 'Delete video job'
  43. requirements:
  44. _entity_access: 'video_transcode_job.delete'
  45. video_transcode.video_transcode_job_settings:
  46. path: '/admin/config/media/transcode-jobs/settings'
  47. defaults:
  48. _form: '\Drupal\video_transcode\Form\TranscodeJobSettingsForm'
  49. _title: 'Video job settings'
  50. requirements:
  51. _permission: 'administer transcode job entity'
  52. # video transcode preset routes
  53. # This is the router item for listing all entities.
  54. entity.video_transcode_preset.list:
  55. path: '/admin/config/media/transcode-preset'
  56. defaults:
  57. _entity_list: 'video_transcode_preset'
  58. _title: 'Presets'
  59. requirements:
  60. _permission: 'administer video transcode presets'
  61. # This is the router item for adding our entity.
  62. entity.video_transcode_preset.add_form:
  63. path: '/admin/config/media/transcode-preset/add'
  64. defaults:
  65. _title: 'Add preset'
  66. # Like _entity_list above, _entity_form gives the entity type ID, only this
  67. # time also lists the form separated by a period. Drupal looks in the
  68. # annotation for the entity and locates the "add" entry under "form" for
  69. # the form class to load.
  70. # @see \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer
  71. _entity_form: video_transcode_preset.add
  72. requirements:
  73. _entity_create_access: video_transcode_preset
  74. # This is the router item for editing our entity.
  75. entity.video_transcode_preset.edit_form:
  76. # Parameters may be passed to the form via the URL path. We name the
  77. # parameter in the path by enclosing it in curly braces. For entity forms,
  78. # we include the entity ID in the path by including a parameter with the
  79. # same name as the entity type ID.
  80. path: '/admin/config/media/transcode-preset/manage/{video_transcode_preset}'
  81. defaults:
  82. _title: 'Edit preset'
  83. # List our add entry above, this _entity_form entry instructs Drupal to
  84. # read our entity type's annonation, and look for the "edit" entry under
  85. # "form".
  86. _entity_form: video_transcode_preset.edit
  87. requirements:
  88. # This uses our entity access controller.
  89. # @see \Drupal\Core\Entity\EntityAccessCheck
  90. _entity_access: video_transcode_preset.update
  91. # This is the router item for deleting an instance of our entity.
  92. entity.video_transcode_preset.delete_form:
  93. path: '/admin/config/media/transcode-preset/manage/{video_transcode_preset}/delete'
  94. defaults:
  95. _title: 'Delete preset'
  96. _entity_form: video_transcode_preset.delete
  97. requirements:
  98. _entity_access: video_transcode_preset.delete