You are here

context_ui.routing.yml in Context 8.0

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