You are here

user_badges.routing.yml in User Badges 8

File

user_badges.routing.yml
View source
  1. # Badge routing definition
  2. entity.badge.canonical:
  3. path: '/admin/structure/badge/{badge}'
  4. defaults:
  5. _entity_view: 'badge'
  6. _title: 'Badge'
  7. requirements:
  8. _entity_access: 'badge.view'
  9. options:
  10. _admin_route: TRUE
  11. entity.badge.collection:
  12. path: 'admin/badges/list'
  13. defaults:
  14. _entity_list: 'badge'
  15. _title: 'Badge list'
  16. requirements:
  17. _permission: 'view badge entities'
  18. options:
  19. _admin_route: TRUE
  20. entity.badge.edit_form:
  21. path: '/admin/structure/badge/{badge}/edit'
  22. defaults:
  23. _entity_form: badge.edit
  24. _title: 'Edit Badge'
  25. requirements:
  26. _permission: 'edit badge entities'
  27. options:
  28. _admin_route: TRUE
  29. entity.badge.delete_form:
  30. path: '/admin/structure/badge/{badge}/delete'
  31. defaults:
  32. _entity_form: badge.delete
  33. _title: 'Delete Badge'
  34. requirements:
  35. _permission: 'delete badge entities'
  36. options:
  37. _admin_route: TRUE
  38. entity.badge_type.add_form:
  39. path: '/admin/structure/badge_type/add'
  40. defaults:
  41. _entity_form: badge_type.add
  42. _title: 'Add badge type'
  43. requirements:
  44. _permission: 'add badge type entities'
  45. options:
  46. _admin_route: TRUE
  47. entity.badge_type.edit_form:
  48. path: '/admin/structure/badge_type/{badge_type}/edit'
  49. defaults:
  50. _entity_form: badge_type.edit
  51. _title: 'Edit badge type'
  52. requirements:
  53. _permission: 'edit badge type entities'
  54. options:
  55. _admin_route: TRUE
  56. entity.badge_type.delete_form:
  57. path: '/admin/structure/badge_type/{badge_type}/delete'
  58. defaults:
  59. _entity_form: badge_type.delete
  60. _title: 'Delete badge type'
  61. requirements:
  62. _permission: 'delete badge type entities'
  63. options:
  64. _admin_route: TRUE
  65. badge.settings:
  66. path: 'admin/structure/badge_type'
  67. defaults:
  68. _entity_list: 'badge_type'
  69. _title: 'Badge settings'
  70. requirements:
  71. _permission: 'view badge type entities'
  72. options:
  73. _admin_route: TRUE
  74. user_badges.badges:
  75. path: 'user/{user}/badges'
  76. defaults:
  77. _controller: '\Drupal\user_badges\Controller\UserBadgesListBuilder::badgesListing'
  78. _title: 'User Badges'
  79. requirements:
  80. _user_badges_access_check: 'TRUE'
  81. user: \d+
  82. user_badges.badge_controller_addPage:
  83. path: '/admin/structure/badge/add'
  84. defaults:
  85. _controller: '\Drupal\user_badges\Controller\BadgeController::addPage'
  86. _title: 'Add Badge'
  87. requirements:
  88. _permission: 'administer badge entities'
  89. options:
  90. _admin_route: TRUE
  91. user_badges.badge_controller_add:
  92. path: 'admin/structure/badge/add/{badge_type}'
  93. defaults:
  94. _controller: '\Drupal\user_badges\Controller\BadgeController::add'
  95. _title_callback: '\Drupal\user_badges\Controller\BadgeController::addBadgeTitle'
  96. requirements:
  97. _permission: 'administer badge entities'
  98. options:
  99. _admin_route: TRUE
  100. parameters:
  101. badge_type:
  102. type: entity:badge_type