You are here

weather.routing.yml in Weather 2.0.x

Same filename and directory in other branches
  1. 8 weather.routing.yml

File

weather.routing.yml
View source
  1. weather.settings:
  2. path: '/admin/config/user-interface/weather'
  3. defaults:
  4. _title: 'Weather'
  5. _form: 'Drupal\weather\Form\SettingsForm'
  6. requirements:
  7. _permission: 'administer system-wide weather'
  8. weather.settings.places:
  9. path: '/admin/config/user-interface/weather/places'
  10. defaults:
  11. _title: 'Places'
  12. _form: 'Drupal\weather\Form\AddCustomPlaceForm'
  13. requirements:
  14. _permission: 'administer system-wide weather'
  15. weather.detailed_forecast:
  16. path: '/weather/{country}/{place}/{city}/{destination}'
  17. defaults:
  18. _title: 'Weather forecast'
  19. _controller: '\Drupal\weather\Controller\WeatherDetailedForecastController::detailedForecast'
  20. requirements:
  21. _permission: 'access content'
  22. # -----------------------------------#
  23. # Weather display routes
  24. # -----------------------------------#
  25. entity.weather_display.add:
  26. path: '/admin/config/user-interface/weather/system-wide/add'
  27. defaults:
  28. _entity_form: weather_display.add
  29. _title: 'Add Weather display'
  30. display_type: 'system-wide'
  31. requirements:
  32. _permission: 'administer system-wide weather'
  33. entity.weather_display.default:
  34. path: '/admin/config/user-interface/weather/system-wide/default'
  35. defaults:
  36. _entity_form: weather_display.add
  37. _title: 'Edit default display'
  38. display_type: 'default'
  39. requirements:
  40. _permission: 'administer system-wide weather'
  41. entity.weather_display.edit_form:
  42. path: '/admin/config/user-interface/weather/system-wide/{display_number}/edit'
  43. defaults:
  44. _entity_form: weather_display.edit
  45. _title: 'Edit Weather display'
  46. display_type: 'system-wide'
  47. requirements:
  48. _permission: 'administer system-wide weather'
  49. entity.weather_display.delete_form:
  50. path: '/admin/config/user-interface/weather/system-wide/{display_number}/delete'
  51. defaults:
  52. _entity_form: weather_display.delete
  53. _title: 'Delete Weather display'
  54. display_type: 'system-wide'
  55. requirements:
  56. _permission: 'administer system-wide weather'
  57. # -----------------------------------#
  58. # Weather display place routes
  59. # -----------------------------------#
  60. entity.weather_display_place.add_form:
  61. path: '/admin/config/user-interface/weather/{display_type}/{display_number}/add'
  62. defaults:
  63. _entity_form: weather_display_place.add
  64. _title: 'Add a place to the display'
  65. requirements:
  66. _permission: 'administer system-wide weather'
  67. entity.weather_display_place.edit_form:
  68. path: '/admin/config/user-interface/weather/weather-display-place/{weather_display_place}/edit'
  69. defaults:
  70. _entity_form: weather_display_place.edit
  71. _title: 'Edit Weather display place'
  72. requirements:
  73. _permission: 'administer system-wide weather'
  74. entity.weather_display_place.delete_form:
  75. path: '/admin/config/user-interface/weather/weather-display-place/{weather_display_place}/delete'
  76. defaults:
  77. _entity_form: weather_display_place.delete
  78. _title: 'Delete Weather display place'
  79. requirements:
  80. _permission: 'administer system-wide weather'
  81. # -----------------------------------#
  82. # User configured weather display.
  83. # -----------------------------------#
  84. weather.user.settings:
  85. path: 'user/{user}/weather'
  86. defaults:
  87. _title: Weather
  88. _controller: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::content'
  89. requirements:
  90. _custom_access: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::access'
  91. # -----------------------------------#
  92. # Manage places in user display.
  93. # -----------------------------------#
  94. weather.user.weather_display_place.add_form:
  95. path: '/user/{user}/weather/add'
  96. defaults:
  97. _entity_form: weather_display_place.add
  98. _title: 'Add a place to user display'
  99. display_type: 'user'
  100. requirements:
  101. _entity_create_access: 'weather_display_place'
  102. _custom_access: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::access'
  103. options:
  104. parameters:
  105. user:
  106. type: entity:user
  107. weather.user.weather_display_place.edit_form:
  108. path: '/user/{user}/weather/{weather_display_place}'
  109. defaults:
  110. _entity_form: weather_display_place.edit
  111. _title: 'Edit Weather display place'
  112. display_type: 'user'
  113. requirements:
  114. _entity_access: 'weather_display_place.update'
  115. _custom_access: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::access'
  116. options:
  117. parameters:
  118. user:
  119. type: entity:user
  120. weather.user.weather_display_place.delete_form:
  121. path: '/user/{user}/weather/{weather_display_place}/delete'
  122. defaults:
  123. _entity_form: weather_display_place.delete
  124. _title: 'Delete Weather display place'
  125. display_type: 'user'
  126. requirements:
  127. _entity_access: 'weather_display_place.delete'
  128. _custom_access: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::access'
  129. options:
  130. parameters:
  131. user:
  132. type: entity:user
  133. weather.user.weather_display.add_form:
  134. path: '/user/{user}/weather/display'
  135. defaults:
  136. _entity_form: weather_display.add
  137. _title: 'Edit user Weather display'
  138. display_type: 'user'
  139. requirements:
  140. _entity_create_access: 'weather_display'
  141. _custom_access: '\Drupal\weather\Controller\WeatherUserConfiguredDisplayController::access'
  142. options:
  143. parameters:
  144. user:
  145. type: entity:user