You are here

webform_share.routing.yml in Webform 8.5

Same filename and directory in other branches
  1. 6.x modules/webform_share/webform_share.routing.yml
modules/webform_share/webform_share.routing.yml

File

modules/webform_share/webform_share.routing.yml
View source
  1. # Iframe embed page with and without JavaScript.
  2. entity.webform.share_page:
  3. path: '/webform/{webform}/share'
  4. defaults:
  5. _controller: '\Drupal\webform_share\Controller\WebformShareController::page'
  6. _title_callback: '\Drupal\webform\Controller\WebformEntityController::title'
  7. options:
  8. parameters:
  9. webform:
  10. type: 'entity:webform'
  11. requirements:
  12. _entity_access: 'webform.submission_create'
  13. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  14. entity.webform.share_page.javascript:
  15. path: '/webform/{webform}/share/{library}/{version}'
  16. defaults:
  17. _controller: '\Drupal\webform_share\Controller\WebformShareController::page'
  18. _title_callback: '\Drupal\webform\Controller\WebformEntityController::title'
  19. options:
  20. parameters:
  21. webform:
  22. type: 'entity:webform'
  23. requirements:
  24. _entity_access: 'webform.submission_create'
  25. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  26. entity.webform.share_script:
  27. path: '/webform/{webform}/share.js'
  28. defaults:
  29. _controller: '\Drupal\webform_share\Controller\WebformShareController::script'
  30. options:
  31. parameters:
  32. webform:
  33. type: 'entity:webform'
  34. requirements:
  35. _entity_access: 'webform.submission_page'
  36. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  37. # Share embed, preview, and test.
  38. entity.webform.share_embed:
  39. path: '/admin/structure/webform/manage/{webform}/share'
  40. defaults:
  41. _form: '\Drupal\webform_share\Form\WebformShareEmbedForm'
  42. _title_callback: '\Drupal\webform\Controller\WebformEntityController::title'
  43. options:
  44. parameters:
  45. webform:
  46. type: 'entity:webform'
  47. requirements:
  48. _entity_access: 'webform.update'
  49. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  50. entity.webform.share_preview:
  51. path: '/admin/structure/webform/manage/{webform}/share/preview'
  52. defaults:
  53. _controller: '\Drupal\webform_share\Controller\WebformShareController::preview'
  54. _title_callback: '\Drupal\webform\Controller\WebformEntityController::title'
  55. options:
  56. parameters:
  57. webform:
  58. type: 'entity:webform'
  59. requirements:
  60. _entity_access: 'webform.submission_create'
  61. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  62. entity.webform.share_test:
  63. path: '/admin/structure/webform/manage/{webform}/share/test'
  64. defaults:
  65. _controller: '\Drupal\webform_share\Controller\WebformShareController::test'
  66. _title_callback: '\Drupal\webform\Controller\WebformEntityController::title'
  67. options:
  68. parameters:
  69. webform:
  70. type: 'entity:webform'
  71. requirements:
  72. _entity_access: 'webform.test'
  73. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkAccess'
  74. # Webform node routes.
  75. # These routes will be removed if the webform_node.module is not installed.
  76. # @see \Drupal\webform_options_limit\Routing\WebformOptionsLimitRouteSubscriber
  77. entity.node.webform.share_embed:
  78. path: '/node/{node}/webform/share'
  79. defaults:
  80. _form: '\Drupal\webform_share\Form\WebformShareEmbedForm'
  81. _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  82. operation: webform_share
  83. entity_access: 'webform.share'
  84. options:
  85. _admin_route: TRUE
  86. parameters:
  87. node:
  88. type: 'entity:node'
  89. requirements:
  90. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkNodeAccess'
  91. entity.node.webform.share_preview:
  92. path: '/node/{node}/webform/share/preview'
  93. defaults:
  94. _controller: '\Drupal\webform_share\Controller\WebformShareController::preview'
  95. _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  96. operation: webform_share_preview
  97. entity_access: 'webform.submission_create'
  98. options:
  99. _admin_route: TRUE
  100. parameters:
  101. node:
  102. type: 'entity:node'
  103. requirements:
  104. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkNodeAccess'
  105. entity.node.webform.share_test:
  106. path: '/node/{node}/webform/share/test'
  107. defaults:
  108. _controller: '\Drupal\webform_share\Controller\WebformShareController::test'
  109. _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  110. operation: webform_share_test
  111. entity_access: 'webform.test'
  112. options:
  113. _admin_route: TRUE
  114. parameters:
  115. node:
  116. type: 'entity:node'
  117. requirements:
  118. _custom_access: '\Drupal\webform_share\Access\WebformShareAccess::checkNodeAccess'