You are here

context_ui.routing.yml in Context 8.4

modules/context_ui/context_ui.routing.yml

File

modules/context_ui/context_ui.routing.yml
View source
  1. # Page to lists all contexts.
  2. entity.context.collection:
  3. path: '/admin/structure/context'
  4. defaults:
  5. _entity_list: 'context'
  6. _title: 'Context'
  7. requirements:
  8. _permission: 'administer contexts'
  9. # Page to add a context.
  10. entity.context.add_form:
  11. path: '/admin/structure/context/add'
  12. defaults:
  13. _entity_form: 'context.add'
  14. _title: 'Add context'
  15. requirements:
  16. _permission: 'administer contexts'
  17. # Page to remove a context.
  18. entity.context.delete_form:
  19. path: '/admin/structure/context/{context}/delete'
  20. defaults:
  21. _entity_form: 'context.delete'
  22. _title: 'Delete context'
  23. requirements:
  24. _permission: 'administer contexts'
  25. # Page to duplicate a context.
  26. entity.context.duplicate_form:
  27. path: '/admin/structure/context/{context}/duplicate'
  28. defaults:
  29. _entity_form: 'context.duplicate'
  30. _title: 'Duplicate context'
  31. requirements:
  32. _permission: 'administer contexts'
  33. # Page to disable a context.
  34. entity.context.disable_form:
  35. path: '/admin/structure/context/{context}/disable'
  36. defaults:
  37. _entity_form: 'context.disable'
  38. _title: 'Disable context'
  39. requirements:
  40. _permission: 'administer contexts'
  41. # Route to get autocomplete results for context groups.
  42. context.groups.autocomplete:
  43. path: '/admin/structure/context/groups/autocomplete'
  44. defaults:
  45. _controller: '\Drupal\context_ui\Controller\ContextUIController::groupsAutocomplete'
  46. requirements:
  47. _permission: 'administer contexts'
  48. ## Context conditions.
  49. context.conditions_library:
  50. path: '/admin/structure/context/{context}/conditions/library'
  51. defaults:
  52. _title: 'Add condition'
  53. _controller: '\Drupal\context_ui\Controller\ContextUIController::listConditions'
  54. requirements:
  55. _entity_access: 'context.update'
  56. context.condition_add:
  57. path: '/admin/structure/context/{context}/condition/add/{condition_id}'
  58. defaults:
  59. _controller: '\Drupal\context_ui\Controller\ContextUIController::addCondition'
  60. requirements:
  61. _entity_access: 'context.update'
  62. context.condition_delete:
  63. path: '/admin/structure/context/{context}/condition/delete/{condition_id}'
  64. defaults:
  65. _form: '\Drupal\context_ui\Form\ConditionDeleteForm'
  66. requirements:
  67. _entity_access: 'context.update'
  68. ## Context reactions.
  69. context.reactions_library:
  70. path: '/admin/structure/context/{context}/reactions/library'
  71. defaults:
  72. _title: 'Add reaction'
  73. _controller: '\Drupal\context_ui\Controller\ContextUIController::listReactions'
  74. requirements:
  75. _entity_access: 'context.update'
  76. context.reaction_add:
  77. path: '/admin/structure/context/{context}/reaction/add/{reaction_id}'
  78. defaults:
  79. _controller: '\Drupal\context_ui\Controller\ContextUIController::addReaction'
  80. requirements:
  81. _entity_access: 'context.update'
  82. context.reaction_delete:
  83. path: '/admin/structure/context/{context}/reaction/delete/{reaction_id}'
  84. defaults:
  85. _form: '\Drupal\context_ui\Form\ReactionDeleteForm'
  86. requirements:
  87. _entity_access: 'context.update'
  88. ## Context blocks reaction.
  89. # Callback handler for when the theme is changed in the blocks configuration form.
  90. context.reaction.blocks.regions:
  91. path: '/admin/structure/context/{context}/reaction/blocks/regions'
  92. defaults:
  93. _controller: '\Drupal\context\Reaction\Blocks\Controller\ContextReactionBlocksController::blocksFormThemeSelect'
  94. requirements:
  95. _entity_access: 'context.update'
  96. # Display a list of all blocks.
  97. context.reaction.blocks.library:
  98. path: '/admin/structure/context/{context}/reaction/blocks/{reaction_id}/library'
  99. defaults:
  100. _title: 'Add block'
  101. _controller: '\Drupal\context\Reaction\Blocks\Controller\ContextReactionBlocksController::blocksLibrary'
  102. requirements:
  103. _entity_access: 'context.update'
  104. # Display a form to deleta a block.
  105. context.reaction.blocks.block_delete:
  106. path: '/admin/structure/context/{context}/reaction/blocks/delete/{block_id}'
  107. defaults:
  108. _form: '\Drupal\context\Reaction\Blocks\Form\BlockDeleteForm'
  109. _title: 'Delete block'
  110. requirements:
  111. _entity_access: 'context.update'
  112. # Display a form to add a block.
  113. context.reaction.blocks.block_add:
  114. path: '/admin/structure/context/{context}/reaction/blocks/{reaction_id}/add/{block_id}'
  115. defaults:
  116. _form: '\Drupal\context\Reaction\Blocks\Form\BlockAddForm'
  117. _title: 'Add block'
  118. requirements:
  119. _entity_access: 'context.update'
  120. # Display a form to edit a block.
  121. context.reaction.blocks.block_edit:
  122. path: '/admin/structure/context/{context}/reaction/blocks/{reaction_id}/edit/{block_id}'
  123. defaults:
  124. _form: '\Drupal\context\Reaction\Blocks\Form\BlockEditForm'
  125. _title: 'Edit block'
  126. requirements:
  127. _entity_access: 'context.update'