You are here

bat_unit.routing.yml in Booking and Availability Management Tools for Drupal 8

modules/bat_unit/bat_unit.routing.yml

File

modules/bat_unit/bat_unit.routing.yml
View source
  1. # UnitType routing definition
  2. entity.bat_unit_type.canonical:
  3. path: '/admin/bat/config/unit_type/{bat_unit_type}'
  4. defaults:
  5. _entity_view: 'bat_unit_type'
  6. _title: 'Unit type'
  7. requirements:
  8. _entity_access: 'bat_unit_type.view'
  9. options:
  10. _admin_route: TRUE
  11. entity.bat_unit_type.collection:
  12. path: '/admin/bat/config/unit_type'
  13. defaults:
  14. _entity_list: 'bat_unit_type'
  15. _title: 'Unit type list'
  16. requirements:
  17. _permission: 'view any bat_unit_type entity'
  18. options:
  19. _admin_route: TRUE
  20. entity.bat_unit_type.add_page:
  21. path: '/admin/bat/config/unit_type/add'
  22. defaults:
  23. _title: 'Add type'
  24. _controller: '\Drupal\bat_unit\Controller\TypeController::addPage'
  25. requirements:
  26. _unit_type_add_access: 'bat_unit_type'
  27. options:
  28. _admin_route: TRUE
  29. entity.bat_unit_type.add:
  30. path: '/admin/bat/config/unit_type/add/{type_bundle}'
  31. defaults:
  32. _controller: '\Drupal\bat_unit\Controller\TypeController::add'
  33. _title_callback: '\Drupal\bat_unit\Controller\TypeController::addPageTitle'
  34. requirements:
  35. _unit_type_add_access: 'bat_unit_type:{type_bundle}'
  36. options:
  37. _admin_route: TRUE
  38. parameters:
  39. type_bundle:
  40. type: entity:bat_type_bundle
  41. with_config_overrides: TRUE
  42. entity.bat_unit_type.edit_form:
  43. path: '/admin/bat/config/unit_type/{bat_unit_type}/edit'
  44. defaults:
  45. _entity_form: bat_unit_type.edit
  46. _title: 'Edit Type'
  47. requirements:
  48. _entity_access: 'bat_unit_type.update'
  49. options:
  50. _admin_route: TRUE
  51. entity.bat_unit_type.delete_form:
  52. path: '/admin/bat/config/unit_type/{bat_unit_type}/delete'
  53. defaults:
  54. _entity_form: bat_unit_type.delete
  55. _title: 'Delete Type'
  56. requirements:
  57. _entity_access: 'bat_unit_type.delete'
  58. options:
  59. _admin_route: TRUE
  60. # Unit routing definition
  61. entity.bat_unit.canonical:
  62. path: '/admin/bat/config/unit/{bat_unit}'
  63. defaults:
  64. _entity_view: 'bat_unit'
  65. _title: 'Unit'
  66. requirements:
  67. _entity_access: 'bat_unit.view'
  68. options:
  69. _admin_route: TRUE
  70. entity.bat_unit.collection:
  71. path: '/admin/bat/config/unit'
  72. defaults:
  73. _entity_list: 'bat_unit'
  74. _title: 'Unit list'
  75. requirements:
  76. _permission: 'view any bat_unit entity'
  77. options:
  78. _admin_route: TRUE
  79. entity.bat_unit.add_page:
  80. path: '/admin/bat/config/unit/add'
  81. defaults:
  82. _title: 'Add unit'
  83. _controller: '\Drupal\bat_unit\Controller\UnitController::addPage'
  84. requirements:
  85. _unit_add_access: 'bat_unit'
  86. options:
  87. _admin_route: TRUE
  88. entity.bat_unit.add_form:
  89. path: '/admin/bat/config/unit/add/{unit_bundle}'
  90. defaults:
  91. _controller: '\Drupal\bat_unit\Controller\UnitController::add'
  92. _title_callback: '\Drupal\bat_unit\Controller\UnitController::addPageTitle'
  93. requirements:
  94. _unit_add_access: 'bat_unit:{unit_bundle}'
  95. options:
  96. _admin_route: TRUE
  97. parameters:
  98. unit_bundle:
  99. type: entity:bat_unit_bundle
  100. with_config_overrides: TRUE
  101. entity.bat_unit.edit_form:
  102. path: '/admin/bat/config/unit/{bat_unit}/edit'
  103. defaults:
  104. _entity_form: bat_unit.edit
  105. _title: 'Edit Unit'
  106. requirements:
  107. _entity_access: 'bat_unit.update'
  108. options:
  109. _admin_route: TRUE
  110. entity.bat_unit.delete_form:
  111. path: '/admin/bat/config/unit/{bat_unit}/delete'
  112. defaults:
  113. _entity_form: bat_unit.delete
  114. _title: 'Delete Unit'
  115. requirements:
  116. _entity_access: 'bat_unit.delete'
  117. options:
  118. _admin_route: TRUE
  119. entity.bat_type_bundle.collection:
  120. path: '/admin/bat/config/type-bundles'
  121. defaults:
  122. _entity_list: 'bat_type_bundle'
  123. _title: 'Type Bundle list'
  124. requirements:
  125. _permission: 'administer bat_type_bundle entities'
  126. options:
  127. _admin_route: TRUE
  128. entity.bat_type_bundle.type_add:
  129. path: '/admin/bat/config/type-bundles/add'
  130. defaults:
  131. _entity_form: 'bat_type_bundle.add'
  132. _title: 'Add type bundle'
  133. requirements:
  134. _permission: 'administer bat_type_bundle entities'
  135. entity.bat_type_bundle.edit_form:
  136. path: '/admin/bat/config/type-bundles/{bat_type_bundle}/edit'
  137. defaults:
  138. _entity_form: 'bat_type_bundle.edit'
  139. _title: 'Edit Type bundle'
  140. requirements:
  141. _permission: 'administer bat_type_bundle entities'
  142. options:
  143. _admin_route: TRUE
  144. entity.bat_type_bundle.delete_form:
  145. path: '/admin/bat/config/type-bundles/{bat_type_bundle}/delete'
  146. defaults:
  147. _entity_form: 'bat_type_bundle.delete'
  148. _title: 'Delete'
  149. requirements:
  150. _permission: 'administer bat_type_bundle entities'
  151. entity.bat_unit_bundle.collection:
  152. path: '/admin/bat/config/unit-bundles'
  153. defaults:
  154. _entity_list: 'bat_unit_bundle'
  155. _title: 'Unit Bundle list'
  156. requirements:
  157. _permission: 'administer bat_unit_bundle entities'
  158. options:
  159. _admin_route: TRUE
  160. entity.bat_unit_bundle.type_add:
  161. path: '/admin/bat/config/unit-bundles/add'
  162. defaults:
  163. _entity_form: 'bat_unit_bundle.add'
  164. _title: 'Add unit bundle'
  165. requirements:
  166. _permission: 'administer bat_unit_bundle entities'
  167. entity.bat_unit_bundle.edit_form:
  168. path: '/admin/bat/config/unit-bundles/{bat_unit_bundle}/edit'
  169. defaults:
  170. _entity_form: bat_unit_bundle.edit
  171. _title: 'Edit Unit bundle'
  172. requirements:
  173. _permission: 'administer bat_unit_bundle entities'
  174. options:
  175. _admin_route: TRUE
  176. entity.bat_unit_bundle.delete_form:
  177. path: '/admin/bat/config/unit-bundles/{bat_unit_bundle}/delete'
  178. defaults:
  179. _entity_form: 'bat_unit_bundle.delete'
  180. _title: 'Delete'
  181. requirements:
  182. _permission: 'administer bat_unit_bundle entities'
  183. unit.multiple_delete_confirm:
  184. path: '/admin/bat/config/units/delete'
  185. defaults:
  186. _form: '\Drupal\bat_unit\Form\UnitDeleteMultiple'
  187. requirements:
  188. _permission: 'bypass bat_unit entities access'
  189. unit.unit_set_state_action:
  190. path: '/admin/bat/config/units/set-state'
  191. defaults:
  192. _form: '\Drupal\bat_unit\Form\UnitSetStateAction'
  193. requirements:
  194. _permission: 'bypass bat_unit entities access'
  195. unit.units_list:
  196. path: '/admin/bat/config/types/type/{bat_unit_type}/units'
  197. defaults:
  198. _controller: '\Drupal\bat_unit\Controller\UnitController::listUnits'
  199. requirements:
  200. _access: 'TRUE'
  201. entity.bat_unit.add_units:
  202. path: '/admin/bat/config/types/type/{bat_unit_type}/units/add'
  203. defaults:
  204. _controller: '\Drupal\bat_unit\Controller\UnitController::addUnits'
  205. requirements:
  206. _access: 'TRUE'