You are here

course.routing.yml in Course 8.3

Same filename and directory in other branches
  1. 8.2 course.routing.yml
  2. 3.x course.routing.yml

File

course.routing.yml
View source
  1. # Landing page for course outline.
  2. course.outline:
  3. path: 'course/{course}/outline'
  4. defaults:
  5. _form: '\Drupal\course\Form\CourseOutlineForm'
  6. _title: 'Course outline'
  7. requirements:
  8. _entity_access: 'course.update'
  9. options:
  10. _admin_route: TRUE
  11. parameters:
  12. course:
  13. type: 'entity:course'
  14. # Landing page for course completion.
  15. course.complete:
  16. path: 'course/{course}/complete'
  17. defaults:
  18. _controller: '\Drupal\course\Controller\CourseController::renderComplete'
  19. _title: 'Course complete'
  20. options:
  21. parameters:
  22. course:
  23. type: 'entity:course'
  24. requirements:
  25. _custom_access: '\Drupal\course\Controller\CourseController::completionAccess'
  26. # Take course tab.
  27. course.take:
  28. path: 'course/{course}/take'
  29. defaults:
  30. _controller: '\Drupal\course\Controller\CourseController::rendertake'
  31. _title: 'Take course'
  32. requirements:
  33. # Access is handled in the controller.
  34. _access: 'TRUE'
  35. options:
  36. parameters:
  37. course:
  38. type: 'entity:course'
  39. # Reports page listing each course object.
  40. course.reports.objects:
  41. path: 'course/{course}/course-reports/objects'
  42. defaults:
  43. _controller: '\Drupal\course\Controller\CourseReportController::render'
  44. _title: 'Course reports'
  45. requirements:
  46. _entity_access: 'course.update'
  47. options:
  48. parameters:
  49. course:
  50. type: 'entity:course'
  51. # Global report area.
  52. course.admin.reports:
  53. path: 'admin/reports/course'
  54. defaults:
  55. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  56. _title: 'Course reports'
  57. requirements:
  58. _permission: 'access all course reports'
  59. # Course object take.
  60. course.object:
  61. path: 'course/{course}/object/{course_object}'
  62. defaults:
  63. _controller: '\Drupal\course\Controller\CourseObjectController::render'
  64. _title: 'Course object router'
  65. requirements:
  66. _entity_access: 'course_object.take'
  67. options:
  68. parameters:
  69. course:
  70. type: 'entity:course'
  71. course_object:
  72. type: 'entity:course_object'
  73. # Course object edit.
  74. course.object.options:
  75. path: 'course/{course}/object/{course_object}/options'
  76. defaults:
  77. _form: '\Drupal\course\Form\CourseObjectForm'
  78. _title: 'Course object settings'
  79. requirements:
  80. _entity_access: 'course.update'
  81. options:
  82. parameters:
  83. course:
  84. type: 'entity:course'
  85. course_object:
  86. # This is not an entity because it may be a temporary ID.
  87. type: 'course_object'
  88. # Course object restore.
  89. course.object.restore:
  90. path: 'course/{course}/object/{course_object}/restore'
  91. defaults:
  92. _controller: '\Drupal\course\Controller\CourseObjectController::restoreObject'
  93. _title: 'Restore object'
  94. requirements:
  95. _entity_access: 'course.update'
  96. options:
  97. parameters:
  98. course:
  99. type: 'entity:course'
  100. course_object:
  101. # This is not an entity because it may be a temporary ID.
  102. type: 'course_object'
  103. course.admin:
  104. path: '/admin/course'
  105. defaults:
  106. _controller: '\Drupal\course\Controller\CourseAdminController::overview'
  107. _title: 'Course'
  108. requirements:
  109. _permission: 'administer course'
  110. # Admin block routes
  111. course.admin.config:
  112. path: '/admin/course/config'
  113. defaults:
  114. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  115. _title: 'Configuration'
  116. requirements:
  117. _permission: 'administer course'
  118. course.admin.manage:
  119. path: '/admin/course/manage'
  120. defaults:
  121. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  122. _title: 'Courses'
  123. requirements:
  124. _permission: 'administer course'
  125. course.admin.structure:
  126. path: '/admin/course/config/structure'
  127. defaults:
  128. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  129. _title: 'Structure'
  130. requirements:
  131. _permission: 'administer course'
  132. course.appearance_settings_form:
  133. path: '/admin/course/appearance'
  134. defaults:
  135. _form: '\Drupal\course\Form\CourseAppearanceSettingsForm'
  136. _title: 'Course appearance settings'
  137. requirements:
  138. _permission: 'administer course'
  139. course.object_settings_form:
  140. path: '/admin/course/object'
  141. defaults:
  142. _form: '\Drupal\course\Form\CourseObjectSettingsForm'
  143. _title: 'Course object settings'
  144. requirements:
  145. _permission: 'administer course'
  146. course.enrollment_settings_form:
  147. path: '/admin/course/enrollment'
  148. defaults:
  149. _form: '\Drupal\course\Form\CourseEnrollmentSettingsForm'
  150. _title: 'Course enrollment settings'
  151. requirements:
  152. _permission: 'administer course'
  153. course.report_settings_form:
  154. path: '/admin/course/report'
  155. defaults:
  156. _form: '\Drupal\course\Form\CourseReportSettingsForm'
  157. _title: 'Course report settings'
  158. requirements:
  159. _permission: 'administer course'
  160. course.manage:
  161. path: '/course/{course}/manage'
  162. defaults:
  163. _form: '\Drupal\course\Form\CourseManageForm'
  164. requirements:
  165. _entity_access: 'course.update'
  166. options:
  167. parameters:
  168. course:
  169. type: 'entity:course'