You are here

gutenberg.routing.yml in Gutenberg 8.2

Same filename and directory in other branches
  1. 8 gutenberg.routing.yml

File

gutenberg.routing.yml
View source
  1. gutenberg.media_edit_form:
  2. # TODO I don't think this is in use. Remove?
  3. path: '/gutenberg/form/media_edit/{media}'
  4. options:
  5. parameters:
  6. media:
  7. type: entity:media
  8. defaults:
  9. _form: '\Drupal\gutenberg\Form\MediaEditForm'
  10. _title: 'MediaEditForm'
  11. parameters:
  12. file:
  13. type: entity:media
  14. requirements:
  15. _permission: 'use gutenberg'
  16. gutenberg.media.upload:
  17. path: '/editor/media/upload/{editor}'
  18. defaults:
  19. _controller: '\Drupal\gutenberg\Controller\MediaController::upload'
  20. methods: 'POST'
  21. requirements:
  22. _entity_access: 'editor.use'
  23. _permission: 'use gutenberg'
  24. _format: json
  25. gutenberg.media.load:
  26. path: '/editor/media/load/{file}'
  27. defaults:
  28. _controller: '\Drupal\gutenberg\Controller\MediaController::load'
  29. parameters:
  30. file:
  31. type: entity:file
  32. methods: 'GET'
  33. requirements:
  34. _permission: 'use gutenberg'
  35. _format: json
  36. gutenberg.media.load_media:
  37. path: '/editor/media/load-media/{media}'
  38. defaults:
  39. _controller: '\Drupal\gutenberg\Controller\MediaController::loadMedia'
  40. methods: 'GET'
  41. requirements:
  42. _permission: 'use gutenberg'
  43. _format: json
  44. gutenberg.media.dialog:
  45. path: '/editor/media/dialog'
  46. defaults:
  47. _controller: '\Drupal\gutenberg\Controller\MediaController::dialog'
  48. methods: 'GET'
  49. requirements:
  50. _permission: 'use gutenberg'
  51. _format: json
  52. gutenberg.media.render:
  53. path: '/editor/media/render/{media}'
  54. defaults:
  55. _controller: '\Drupal\gutenberg\Controller\MediaController::render'
  56. methods: 'GET'
  57. requirements:
  58. _permission: 'use gutenberg'
  59. _format: json
  60. gutenberg.blocks.load:
  61. path: '/editor/blocks/load_by_type/{content_type}'
  62. defaults:
  63. _controller: '\Drupal\gutenberg\Controller\BlocksController::loadByType'
  64. content_type: 'none'
  65. methods: 'GET'
  66. requirements:
  67. _permission: 'use gutenberg'
  68. _format: json
  69. gutenberg.blocks.load_single:
  70. path: '/editor/blocks/load/{plugin_id}'
  71. defaults:
  72. _controller: '\Drupal\gutenberg\Controller\BlocksController::loadById'
  73. # parameters:
  74. # block:
  75. # type: entity:block
  76. methods: 'GET'
  77. requirements:
  78. _permission: 'use gutenberg'
  79. _format: json
  80. gutenberg.reusable_blocks.create:
  81. path: '/editor/reusable-blocks'
  82. defaults:
  83. _controller: '\Drupal\gutenberg\Controller\ReusableBlocksController::save'
  84. methods: 'POST'
  85. requirements:
  86. _permission: 'use gutenberg'
  87. _format: json
  88. gutenberg.reusable_blocks.update:
  89. path: '/editor/reusable-blocks/{block_id}'
  90. defaults:
  91. _controller: '\Drupal\gutenberg\Controller\ReusableBlocksController::save'
  92. methods: 'PUT'
  93. requirements:
  94. _custom_access: '\Drupal\gutenberg\Controller\ReusableBlocksController::access'
  95. _format: json
  96. gutenberg.reusable_blocks.delete:
  97. path: '/editor/reusable-blocks/{block_id}'
  98. defaults:
  99. _controller: '\Drupal\gutenberg\Controller\ReusableBlocksController::delete'
  100. methods: 'DELETE'
  101. requirements:
  102. _custom_access: '\Drupal\gutenberg\Controller\ReusableBlocksController::access'
  103. _format: json
  104. gutenberg.reusable_blocks.load:
  105. path: '/editor/reusable-blocks'
  106. defaults:
  107. _controller: '\Drupal\gutenberg\Controller\ReusableBlocksController::load'
  108. methods: 'GET'
  109. requirements:
  110. _permission: 'use gutenberg'
  111. _format: json
  112. gutenberg.reusable_blocks.load_single:
  113. path: '/editor/reusable-blocks/{block_id}'
  114. defaults:
  115. _controller: '\Drupal\gutenberg\Controller\ReusableBlocksController::load'
  116. methods: 'GET'
  117. requirements:
  118. _custom_access: '\Drupal\gutenberg\Controller\ReusableBlocksController::access'
  119. _format: json
  120. gutenberg.oembed:
  121. path: '/editor/oembed'
  122. defaults:
  123. _controller: '\Drupal\gutenberg\Controller\OEmbedProxyUrlController::request'
  124. _disable_route_normalizer: 'TRUE'
  125. methods: 'GET'
  126. requirements:
  127. _permission: 'use gutenberg'
  128. _format: json
  129. gutenberg.content.search:
  130. path: '/editor/search'
  131. defaults:
  132. _controller: '\Drupal\gutenberg\Controller\SearchController::search'
  133. methods: 'GET'
  134. requirements:
  135. _permission: 'use gutenberg'
  136. _format: json
  137. gutenberg.media.search:
  138. path: '/editor/media/search/{type}/{search}'
  139. defaults:
  140. _controller: '\Drupal\gutenberg\Controller\MediaController::search'
  141. methods: 'GET'
  142. requirements:
  143. _permission: 'use gutenberg'
  144. _format: json
  145. gutenberg.media.update_data:
  146. path: '/editor/media/update_data/{fid}'
  147. defaults:
  148. _controller: '\Drupal\gutenberg\Controller\MediaController::updateData'
  149. methods: 'POST'
  150. requirements:
  151. _permission: 'use gutenberg'
  152. _format: json
  153. gutenberg.media.autocomplete:
  154. path: '/editor/media/autocomplete'
  155. defaults:
  156. _controller: '\Drupal\gutenberg\Controller\MediaController::autocomplete'
  157. methods: 'GET'
  158. requirements:
  159. _permission: 'use gutenberg'
  160. _format: json