menu_test.routing.yml

Same filename in other branches
  1. 8.9.x core/modules/system/tests/modules/menu_test/menu_test.routing.yml
  2. 10 core/modules/system/tests/modules/menu_test/menu_test.routing.yml
  3. 11.x core/modules/system/tests/modules/menu_test/menu_test.routing.yml
core/modules/system/tests/modules/menu_test/menu_test.routing.yml
11 string references to YAML keys in menu_test.routing.yml
ContextualDynamicContextTest::testDifferentPermissions in core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
Tests contextual links with different permissions.
LocalActionManagerTest::testCacheability in core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
Tests the cacheability of local actions.
LocalActionTest::testLocalAction in core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
Tests appearance of local actions.
LocalTasksTest::testLocalTaskBlock in core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
Tests that local task blocks are configurable to show a specific level.
LocalTasksTest::testPluginLocalTask in core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
Tests the plugin based local tasks.

... See full list

File

core/modules/system/tests/modules/menu_test/menu_test.routing.yml

View source
  1. menu_test.menu_name_test:
  2. path: '/menu_name_test'
  3. defaults:
  4. _title: 'Test menu_name router item'
  5. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  6. requirements:
  7. _access: 'TRUE'
  8. menu_test.menu_callback_title:
  9. path: '/menu_callback_title'
  10. defaults:
  11. _title: 'Menu Callback Title'
  12. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  13. requirements:
  14. _access: 'TRUE'
  15. menu_test.login_callback:
  16. path: '/menu_login_callback'
  17. defaults:
  18. _controller: '\Drupal\menu_test\TestControllers::testLogin'
  19. requirements:
  20. _access: 'TRUE'
  21. options:
  22. _maintenance_access: TRUE
  23. menu_test.callback_description:
  24. path: '/menu_callback_description'
  25. defaults:
  26. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  27. requirements:
  28. _access: 'TRUE'
  29. menu_test.callback_description_plain:
  30. path: '/menu_callback_description/description-plain'
  31. defaults:
  32. _title: 'Menu item with a regular description'
  33. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  34. requirements:
  35. _access: 'TRUE'
  36. menu_test.menu_no_title_callback:
  37. path: '/menu_no_title_callback'
  38. defaults:
  39. _title: 'A title with @placeholder'
  40. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  41. requirements:
  42. _access: 'TRUE'
  43. menu_test.router_test1:
  44. path: '/foo/{bar}'
  45. defaults:
  46. _controller: '\Drupal\menu_test\TestControllers::test1'
  47. requirements:
  48. _access: 'TRUE'
  49. menu_test.router_test2:
  50. path: '/foo/{bar}/b'
  51. defaults:
  52. _controller: '\Drupal\menu_test\TestControllers::test2'
  53. requirements:
  54. _access: 'TRUE'
  55. menu_test.router_test3:
  56. path: '/foo/{bar}/c'
  57. defaults:
  58. _controller: '\Drupal\menu_test\TestControllers::test2'
  59. requirements:
  60. _access: 'FALSE'
  61. menu_test.router_test4:
  62. path: '/foo/{bar}/d'
  63. defaults:
  64. _controller: '\Drupal\menu_test\TestControllers::test2'
  65. requirements:
  66. _access: 'TRUE'
  67. menu_test.router_test_session:
  68. path: '/menu_test_access_check_session'
  69. defaults:
  70. _controller: '\Drupal\menu_test\TestControllers::testSession'
  71. options:
  72. no_cache: TRUE
  73. requirements:
  74. _menu_test_session_access: 'TRUE'
  75. menu_test.local_action1:
  76. path: '/menu-test-local-action'
  77. defaults:
  78. _controller: '\Drupal\menu_test\TestControllers::test1'
  79. requirements:
  80. _access: 'TRUE'
  81. menu_test.local_action2:
  82. path: '/menu-test-local-action/hook_menu'
  83. defaults:
  84. _controller: '\Drupal\menu_test\TestControllers::test2'
  85. requirements:
  86. _access: 'TRUE'
  87. menu_test.local_action3:
  88. path: '/menu-test-local-action/routing'
  89. defaults:
  90. _controller: '\Drupal\menu_test\TestControllers::test2'
  91. requirements:
  92. _access: 'TRUE'
  93. menu_test.local_action4:
  94. path: '/menu-test-local-action/dynamic-title'
  95. defaults:
  96. _controller: '\Drupal\menu_test\TestControllers::test2'
  97. requirements:
  98. _access: 'TRUE'
  99. menu_test.local_action5:
  100. path: '/menu-test-local-action/routing2'
  101. defaults:
  102. _controller: '\Drupal\menu_test\TestControllers::test2'
  103. requirements:
  104. _access: 'TRUE'
  105. menu_test.local_action6:
  106. path: '/menu-test-local-action/cache-check'
  107. defaults:
  108. _controller: '\Drupal\menu_test\TestControllers::test2'
  109. requirements:
  110. _access: 'TRUE'
  111. menu_test.local_action7:
  112. path: '/menu-test-local-action-7/cache-check'
  113. defaults:
  114. _controller: '\Drupal\menu_test\TestControllers::test2'
  115. requirements:
  116. _custom_access: '\Drupal\menu_test\Access\AccessCheck::menuLocalAction7'
  117. menu_test.local_action8:
  118. path: '/menu-test-local-action-8/cache-check'
  119. defaults:
  120. _controller: '\Drupal\menu_test\TestControllers::test2'
  121. requirements:
  122. _custom_access: '\Drupal\menu_test\Access\AccessCheck::menuLocalAction8'
  123. menu_test.contextual_test:
  124. path: '/menu-test-contextual/default'
  125. defaults:
  126. _controller: '\Drupal\menu_test\TestControllers::testContextual'
  127. requirements:
  128. _access: 'TRUE'
  129. menu_test.contextual_hidden_manage:
  130. path: '/menu-test-contextual/{bar}'
  131. defaults:
  132. _controller: '\Drupal\menu_test\TestControllers::test1'
  133. requirements:
  134. _access: 'TRUE'
  135. menu_test.contextual_hidden_manage_edit:
  136. path: '/menu-test-contextual/{bar}/edit'
  137. defaults:
  138. _controller: '\Drupal\menu_test\TestControllers::test2'
  139. requirements:
  140. _access: 'TRUE'
  141. menu_test.local_task_test_tasks:
  142. path: '/menu-local-task-test/tasks'
  143. defaults:
  144. _controller: '\Drupal\menu_test\TestControllers::test1'
  145. requirements:
  146. _access: 'TRUE'
  147. menu_test.tasks_default:
  148. path: '/menu-local-task-test/default'
  149. defaults:
  150. _controller: '\Drupal\menu_test\TestControllers::test1'
  151. requirements:
  152. _access: 'TRUE'
  153. menu_test.local_task_test_tasks_tasks:
  154. path: '/menu-local-task-test/tasks/tasks'
  155. defaults:
  156. _controller: '\Drupal\menu_test\TestControllers::test1'
  157. requirements:
  158. _access: 'TRUE'
  159. menu_test.local_task_test_tasks_view:
  160. path: '/menu-local-task-test/tasks/view'
  161. defaults:
  162. _controller: '\Drupal\menu_test\TestControllers::test1'
  163. requirements:
  164. _access: 'TRUE'
  165. menu_test.local_task_test_tasks_edit:
  166. path: '/menu-local-task-test/tasks/edit'
  167. defaults:
  168. _controller: '\Drupal\menu_test\TestControllers::test1'
  169. requirements:
  170. _access: 'TRUE'
  171. menu_test.local_task_test_tasks_settings:
  172. path: '/menu-local-task-test/tasks/settings'
  173. defaults:
  174. _controller: '\Drupal\menu_test\TestControllers::test1'
  175. requirements:
  176. _access: 'TRUE'
  177. menu_test.local_task_test_tasks_settings_dynamic:
  178. path: '/menu-local-task-test/tasks/settings-dynamic'
  179. defaults:
  180. _controller: '\Drupal\menu_test\TestControllers::test1'
  181. requirements:
  182. _access: 'TRUE'
  183. menu_test.local_task_test_tasks_settings_sub1:
  184. path: '/menu-local-task-test/tasks/settings/sub1'
  185. defaults:
  186. _controller: '\Drupal\menu_test\TestControllers::test1'
  187. requirements:
  188. _access: 'TRUE'
  189. menu_test.local_task_test_tasks_settings_sub2:
  190. path: '/menu-local-task-test/tasks/settings/sub2'
  191. defaults:
  192. _controller: '\Drupal\menu_test\TestControllers::test1'
  193. requirements:
  194. _access: 'TRUE'
  195. menu_test.local_task_test_tasks_settings_sub3:
  196. path: '/menu-local-task-test/tasks/settings/sub3'
  197. defaults:
  198. _controller: '\Drupal\menu_test\TestControllers::test1'
  199. requirements:
  200. _access: 'TRUE'
  201. menu_test.local_task_test_tasks_settings_derived:
  202. path: '/menu-local-task-test/tasks/settings/{placeholder}'
  203. defaults:
  204. _controller: '\Drupal\menu_test\TestControllers::testDerived'
  205. requirements:
  206. _access: 'TRUE'
  207. menu_test.local_task_test_placeholder_sub1:
  208. path: '/menu-local-task-test-dynamic/{placeholder}/sub1'
  209. defaults:
  210. _controller: '\Drupal\menu_test\TestControllers::test1'
  211. requirements:
  212. _access: 'TRUE'
  213. menu_test.local_task_test_placeholder_sub2:
  214. path: '/menu-local-task-test-dynamic/{placeholder}/sub2'
  215. defaults:
  216. _controller: '\Drupal\menu_test\TestControllers::test1'
  217. requirements:
  218. _access: 'TRUE'
  219. menu_test.local_task_test_upcasting_sub1:
  220. path: '/menu-local-task-test-upcasting/{entity_test}/sub1'
  221. defaults:
  222. _controller: '\Drupal\menu_test\TestControllers::test1'
  223. requirements:
  224. _access: 'TRUE'
  225. menu_test.local_task_test_upcasting_sub2:
  226. path: '/menu-local-task-test-upcasting/{entity_test}/sub2'
  227. defaults:
  228. _controller: '\Drupal\menu_test\TestControllers::test1'
  229. requirements:
  230. _access: 'TRUE'
  231. menu_test.optional_placeholder:
  232. path: '/menu-test/optional/{placeholder}'
  233. defaults:
  234. _controller: '\Drupal\menu_test\TestControllers::testDefaults'
  235. placeholder: NULL
  236. requirements:
  237. _access: 'TRUE'
  238. menu_test.menu_test_maintain:
  239. path: '/menu_test_maintain/{test}'
  240. defaults:
  241. _title: 'Menu maintain test'
  242. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  243. requirements:
  244. _access: 'TRUE'
  245. menu_test.hierarchy_parent:
  246. path: '/menu-test/hierarchy/parent'
  247. defaults:
  248. _title: 'Parent menu router'
  249. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  250. requirements:
  251. _access: 'TRUE'
  252. menu_test.hierarchy_parent_child:
  253. path: '/menu-test/hierarchy/parent/child'
  254. defaults:
  255. _title: 'Child menu router'
  256. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  257. requirements:
  258. _access: 'TRUE'
  259. menu_test.hierarchy_parent_child2:
  260. path: '/menu-test/hierarchy/parent/child2/child'
  261. defaults:
  262. _title: 'Unattached subchild router'
  263. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  264. requirements:
  265. _access: 'TRUE'
  266. menu_test.menu_test:
  267. path: '/menu-test'
  268. defaults:
  269. _title: 'Menu test root'
  270. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  271. requirements:
  272. _access: 'TRUE'
  273. menu_test.hidden:
  274. path: '/menu-test/hidden'
  275. defaults:
  276. _title: 'Hidden test root'
  277. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  278. requirements:
  279. _access: 'TRUE'
  280. menu_test.hidden_menu:
  281. path: '/menu-test/hidden/menu'
  282. defaults:
  283. _title: 'Menus'
  284. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  285. requirements:
  286. _access: 'TRUE'
  287. menu_test.hidden_block:
  288. path: '/menu-test/hidden/block'
  289. defaults:
  290. _title: 'Blocks'
  291. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  292. requirements:
  293. _access: 'TRUE'
  294. menu_test.hidden_block_add:
  295. path: '/menu-test/hidden/block/add'
  296. defaults:
  297. _title: 'Add block'
  298. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  299. requirements:
  300. _access: 'TRUE'
  301. menu_test.hidden_block_configure:
  302. path: '/menu-test/hidden/block/manage/{foo}/{bar}'
  303. defaults:
  304. _title: 'Configure block'
  305. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  306. requirements:
  307. _access: 'TRUE'
  308. menu_test.hidden_block_delete:
  309. path: '/menu-test/hidden/block/manage/{foo}/{bar}/delete'
  310. defaults:
  311. _title: 'Configure block'
  312. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  313. requirements:
  314. _access: 'TRUE'
  315. menu_test.theme_callback:
  316. path: '/menu-test/theme-callback/{inherited}'
  317. defaults:
  318. _title: 'Page that displays different themes'
  319. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  320. requirements:
  321. _access: 'TRUE'
  322. menu_test.no_theme_callback:
  323. path: '/menu-test/no-theme-callback'
  324. defaults:
  325. _title: 'Page that displays different themes without using a theme negotiation.'
  326. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  327. inherited: false
  328. requirements:
  329. _access: 'TRUE'
  330. menu_test.exotic_path:
  331. # "Special" ASCII characters, characters that look like a percent-escaped
  332. # string, and characters from various non-ASCII alphabets.
  333. # @todo Find a way to use the correct path.
  334. # cSpell:disable-next-line
  335. #path: "/menu-test/ -._~!$'\"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞"
  336. path: '/menu-test/{exotic}'
  337. defaults:
  338. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  339. requirements:
  340. exotic: '.+'
  341. _access: 'TRUE'
  342. menu_test.theme_callback_inheritance:
  343. path: '/menu-test/theme-callback/{inherited}/inheritance'
  344. defaults:
  345. _title: 'Page that tests theme negotiation inheritance.'
  346. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  347. requirements:
  348. _access: 'TRUE'
  349. menu_test.title_test_case1:
  350. path: '/menu-title-test/case1'
  351. defaults:
  352. _title: 'Example title - Case 1'
  353. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  354. requirements:
  355. _access: 'TRUE'
  356. menu_test.title_test_case2:
  357. path: '/menu-title-test/case2'
  358. defaults:
  359. _title: 'Example title'
  360. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::titleCallback'
  361. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  362. requirements:
  363. _access: 'TRUE'
  364. menu_test.title_test_case3:
  365. path: '/menu-title-test/case3'
  366. defaults:
  367. _title: 'Bike sheds full of blue smurfs' # this should be ignored
  368. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::titleCallback'
  369. _title_arguments:
  370. title: 'Example title'
  371. case_number: '3'
  372. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  373. requirements:
  374. _access: 'TRUE'
  375. menu_test.context:
  376. path: '/menu-test/context'
  377. defaults:
  378. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  379. requirements:
  380. _access: 'TRUE'
  381. menu_test.custom:
  382. path: '/menu-test/custom'
  383. defaults:
  384. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  385. requirements:
  386. _access: 'TRUE'
  387. menu_test.breadcrumb1:
  388. path: '/menu-test/breadcrumb1'
  389. defaults:
  390. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  391. _title: '<script>alert(12);</script>'
  392. requirements:
  393. _access: 'TRUE'
  394. menu_test.breadcrumb2:
  395. path: '/menu-test/breadcrumb1/breadcrumb2'
  396. defaults:
  397. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  398. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::breadcrumbTitleCallback'
  399. requirements:
  400. _access: 'TRUE'
  401. menu_test.breadcrumb3:
  402. path: '/menu-test/breadcrumb1/breadcrumb2/breadcrumb3'
  403. defaults:
  404. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  405. _title: 'Normal title'
  406. requirements:
  407. _access: 'TRUE'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.