menu_test.routing.yml

Same filename in other branches
  1. 9 core/modules/system/tests/modules/menu_test/menu_test.routing.yml
  2. 8.9.x core/modules/system/tests/modules/menu_test/menu_test.routing.yml
  3. 10 core/modules/system/tests/modules/menu_test/menu_test.routing.yml
core/modules/system/tests/modules/menu_test/menu_test.routing.yml
13 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.parent_test:
  37. path: '/parent_test'
  38. defaults:
  39. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  40. requirements:
  41. _permission: 'access parent test page'
  42. menu_test.child1_test:
  43. path: '/parent_test/child1_test'
  44. defaults:
  45. _controller: '\Drupal\system\Controller\SystemController::overview'
  46. link_id: 'menu_test.parent_test.child1_test'
  47. _title: 'Configuration'
  48. requirements:
  49. _permission: 'access child1 test page'
  50. menu_test.child2_test:
  51. path: '/parent_test/child2_test'
  52. defaults:
  53. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  54. requirements:
  55. _permission: 'access child2 test page'
  56. menu_test.child3_test_block:
  57. path: '/parent_test/child3_test'
  58. defaults:
  59. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  60. requirements:
  61. _access: 'TRUE'
  62. menu_test.child4_test:
  63. path: '/parent_test/child4_test'
  64. defaults:
  65. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  66. requirements:
  67. _permission: 'access child4 test page'
  68. menu_test.grand_child4_test:
  69. path: '/parent_test/child4_test/grand_child4_test'
  70. defaults:
  71. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  72. requirements:
  73. _permission: 'access grand child4 test page'
  74. menu_test.child4_test_overview:
  75. path: '/parent_test/child4_test'
  76. defaults:
  77. _controller: '\Drupal\system\Controller\SystemController::overview'
  78. link_id: 'menu_test.parent_test.child4_test'
  79. _title: 'Configuration'
  80. requirements:
  81. _access: 'TRUE'
  82. menu_test.grand_child1_test:
  83. path: '/parent_test/child_test/grand_child1_test'
  84. defaults:
  85. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  86. requirements:
  87. _permission: 'access grand child1 test page'
  88. menu_test.great_grand_child1_test:
  89. path: '/parent_test/child_test/great_grand_child1_test'
  90. defaults:
  91. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  92. requirements:
  93. _permission: 'access great grand child1 test page'
  94. menu_test.grand_child2_test:
  95. path: '/parent_test/child_test/grand_child2_test'
  96. defaults:
  97. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  98. requirements:
  99. _permission: 'access grand child2 test page'
  100. menu_test.grand_child3_test:
  101. path: '/parent_test/child_test/grand_child3_test'
  102. defaults:
  103. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  104. requirements:
  105. _permission: 'access grand child3 test page'
  106. menu_test.parent_test_param:
  107. path: '/parent_test_param/{param}'
  108. defaults:
  109. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  110. param: 'child_uses_default'
  111. requirements:
  112. _permission: 'access parent test page'
  113. menu_test.child_test_param:
  114. path: '/parent_test_child_test_param/{param}'
  115. defaults:
  116. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  117. param: 'my_default'
  118. requirements:
  119. _permission: 'access child1 test page'
  120. menu_test.parent_test_param_explicit:
  121. path: '/parent_test_param_explicit/{param}'
  122. defaults:
  123. _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
  124. param: 'my_default'
  125. requirements:
  126. _permission: 'access parent test page'
  127. menu_test.child_test_param_explicit:
  128. path: '/parent_test_child_test_param_explicit/{param}'
  129. defaults:
  130. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  131. param: 'my_default'
  132. requirements:
  133. _permission: 'access child1 test page'
  134. menu_test.menu_no_title_callback:
  135. path: '/menu_no_title_callback'
  136. defaults:
  137. _title: 'A title with @placeholder'
  138. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  139. requirements:
  140. _access: 'TRUE'
  141. menu_test.router_test1:
  142. path: '/foo/{bar}'
  143. defaults:
  144. _controller: '\Drupal\menu_test\TestControllers::test1'
  145. requirements:
  146. _access: 'TRUE'
  147. menu_test.router_test2:
  148. path: '/foo/{bar}/b'
  149. defaults:
  150. _controller: '\Drupal\menu_test\TestControllers::test2'
  151. requirements:
  152. _access: 'TRUE'
  153. menu_test.router_test3:
  154. path: '/foo/{bar}/c'
  155. defaults:
  156. _controller: '\Drupal\menu_test\TestControllers::test2'
  157. requirements:
  158. _access: 'FALSE'
  159. menu_test.router_test4:
  160. path: '/foo/{bar}/d'
  161. defaults:
  162. _controller: '\Drupal\menu_test\TestControllers::test2'
  163. requirements:
  164. _access: 'TRUE'
  165. menu_test.router_test_session:
  166. path: '/menu_test_access_check_session'
  167. defaults:
  168. _controller: '\Drupal\menu_test\TestControllers::testSession'
  169. options:
  170. no_cache: TRUE
  171. requirements:
  172. _menu_test_session_access: 'TRUE'
  173. menu_test.local_action1:
  174. path: '/menu-test-local-action'
  175. defaults:
  176. _controller: '\Drupal\menu_test\TestControllers::test1'
  177. requirements:
  178. _access: 'TRUE'
  179. menu_test.local_action2:
  180. path: '/menu-test-local-action/hook_menu'
  181. defaults:
  182. _controller: '\Drupal\menu_test\TestControllers::test2'
  183. requirements:
  184. _access: 'TRUE'
  185. menu_test.local_action3:
  186. path: '/menu-test-local-action/routing'
  187. defaults:
  188. _controller: '\Drupal\menu_test\TestControllers::test2'
  189. requirements:
  190. _access: 'TRUE'
  191. menu_test.local_action4:
  192. path: '/menu-test-local-action/dynamic-title'
  193. defaults:
  194. _controller: '\Drupal\menu_test\TestControllers::test2'
  195. requirements:
  196. _access: 'TRUE'
  197. menu_test.local_action5:
  198. path: '/menu-test-local-action/routing2'
  199. defaults:
  200. _controller: '\Drupal\menu_test\TestControllers::test2'
  201. requirements:
  202. _access: 'TRUE'
  203. menu_test.local_action6:
  204. path: '/menu-test-local-action/cache-check'
  205. defaults:
  206. _controller: '\Drupal\menu_test\TestControllers::test2'
  207. requirements:
  208. _access: 'TRUE'
  209. menu_test.local_action7:
  210. path: '/menu-test-local-action-7/cache-check'
  211. defaults:
  212. _controller: '\Drupal\menu_test\TestControllers::test2'
  213. requirements:
  214. _custom_access: '\Drupal\menu_test\Access\AccessCheck::menuLocalAction7'
  215. menu_test.local_action8:
  216. path: '/menu-test-local-action-8/cache-check'
  217. defaults:
  218. _controller: '\Drupal\menu_test\TestControllers::test2'
  219. requirements:
  220. _custom_access: '\Drupal\menu_test\Access\AccessCheck::menuLocalAction8'
  221. menu_test.contextual_test:
  222. path: '/menu-test-contextual/default'
  223. defaults:
  224. _controller: '\Drupal\menu_test\TestControllers::testContextual'
  225. requirements:
  226. _access: 'TRUE'
  227. menu_test.contextual_hidden_manage:
  228. path: '/menu-test-contextual/{bar}'
  229. defaults:
  230. _controller: '\Drupal\menu_test\TestControllers::test1'
  231. requirements:
  232. _access: 'TRUE'
  233. menu_test.contextual_hidden_manage_edit:
  234. path: '/menu-test-contextual/{bar}/edit'
  235. defaults:
  236. _controller: '\Drupal\menu_test\TestControllers::test2'
  237. requirements:
  238. _access: 'TRUE'
  239. menu_test.local_task_test_tasks:
  240. path: '/menu-local-task-test/tasks'
  241. defaults:
  242. _controller: '\Drupal\menu_test\TestControllers::test1'
  243. requirements:
  244. _access: 'TRUE'
  245. menu_test.tasks_default:
  246. path: '/menu-local-task-test/default'
  247. defaults:
  248. _controller: '\Drupal\menu_test\TestControllers::test1'
  249. requirements:
  250. _access: 'TRUE'
  251. menu_test.local_task_test_tasks_tasks:
  252. path: '/menu-local-task-test/tasks/tasks'
  253. defaults:
  254. _controller: '\Drupal\menu_test\TestControllers::test1'
  255. requirements:
  256. _access: 'TRUE'
  257. menu_test.local_task_test_tasks_view:
  258. path: '/menu-local-task-test/tasks/view'
  259. defaults:
  260. _controller: '\Drupal\menu_test\TestControllers::test1'
  261. requirements:
  262. _access: 'TRUE'
  263. menu_test.local_task_test_tasks_edit:
  264. path: '/menu-local-task-test/tasks/edit'
  265. defaults:
  266. _controller: '\Drupal\menu_test\TestControllers::test1'
  267. requirements:
  268. _access: 'TRUE'
  269. menu_test.local_task_test_tasks_settings:
  270. path: '/menu-local-task-test/tasks/settings'
  271. defaults:
  272. _controller: '\Drupal\menu_test\TestControllers::test1'
  273. requirements:
  274. _access: 'TRUE'
  275. menu_test.local_task_test_tasks_settings_dynamic:
  276. path: '/menu-local-task-test/tasks/settings-dynamic'
  277. defaults:
  278. _controller: '\Drupal\menu_test\TestControllers::test1'
  279. requirements:
  280. _access: 'TRUE'
  281. menu_test.local_task_test_tasks_settings_sub1:
  282. path: '/menu-local-task-test/tasks/settings/sub1'
  283. defaults:
  284. _controller: '\Drupal\menu_test\TestControllers::test1'
  285. requirements:
  286. _access: 'TRUE'
  287. menu_test.local_task_test_tasks_settings_sub2:
  288. path: '/menu-local-task-test/tasks/settings/sub2'
  289. defaults:
  290. _controller: '\Drupal\menu_test\TestControllers::test1'
  291. requirements:
  292. _access: 'TRUE'
  293. menu_test.local_task_test_tasks_settings_sub3:
  294. path: '/menu-local-task-test/tasks/settings/sub3'
  295. defaults:
  296. _controller: '\Drupal\menu_test\TestControllers::test1'
  297. requirements:
  298. _access: 'TRUE'
  299. menu_test.local_task_test_tasks_settings_derived:
  300. path: '/menu-local-task-test/tasks/settings/{placeholder}'
  301. defaults:
  302. _controller: '\Drupal\menu_test\TestControllers::testDerived'
  303. requirements:
  304. _access: 'TRUE'
  305. menu_test.local_task_test_placeholder_sub1:
  306. path: '/menu-local-task-test-dynamic/{placeholder}/sub1'
  307. defaults:
  308. _controller: '\Drupal\menu_test\TestControllers::test1'
  309. requirements:
  310. _access: 'TRUE'
  311. menu_test.local_task_test_placeholder_sub2:
  312. path: '/menu-local-task-test-dynamic/{placeholder}/sub2'
  313. defaults:
  314. _controller: '\Drupal\menu_test\TestControllers::test1'
  315. requirements:
  316. _access: 'TRUE'
  317. menu_test.local_task_test_upcasting_sub1:
  318. path: '/menu-local-task-test-upcasting/{entity_test}/sub1'
  319. defaults:
  320. _controller: '\Drupal\menu_test\TestControllers::test1'
  321. requirements:
  322. _access: 'TRUE'
  323. menu_test.local_task_test_upcasting_sub2:
  324. path: '/menu-local-task-test-upcasting/{entity_test}/sub2'
  325. defaults:
  326. _controller: '\Drupal\menu_test\TestControllers::test1'
  327. requirements:
  328. _access: 'TRUE'
  329. menu_test.optional_placeholder:
  330. path: '/menu-test/optional/{placeholder}'
  331. defaults:
  332. _controller: '\Drupal\menu_test\TestControllers::testDefaults'
  333. placeholder: NULL
  334. requirements:
  335. _access: 'TRUE'
  336. menu_test.menu_test_maintain:
  337. path: '/menu_test_maintain/{test}'
  338. defaults:
  339. _title: 'Menu maintain test'
  340. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  341. requirements:
  342. _access: 'TRUE'
  343. menu_test.hierarchy_parent:
  344. path: '/menu-test/hierarchy/parent'
  345. defaults:
  346. _title: 'Parent menu router'
  347. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  348. requirements:
  349. _access: 'TRUE'
  350. menu_test.hierarchy_parent_child:
  351. path: '/menu-test/hierarchy/parent/child'
  352. defaults:
  353. _title: 'Child menu router'
  354. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  355. requirements:
  356. _access: 'TRUE'
  357. menu_test.hierarchy_parent_child2:
  358. path: '/menu-test/hierarchy/parent/child2/child'
  359. defaults:
  360. _title: 'Unattached subchild router'
  361. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  362. requirements:
  363. _access: 'TRUE'
  364. menu_test.menu_test:
  365. path: '/menu-test'
  366. defaults:
  367. _title: 'Menu test root'
  368. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  369. requirements:
  370. _access: 'TRUE'
  371. menu_test.hidden:
  372. path: '/menu-test/hidden'
  373. defaults:
  374. _title: 'Hidden test root'
  375. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  376. requirements:
  377. _access: 'TRUE'
  378. menu_test.hidden_menu:
  379. path: '/menu-test/hidden/menu'
  380. defaults:
  381. _title: 'Menus'
  382. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  383. requirements:
  384. _access: 'TRUE'
  385. menu_test.hidden_block:
  386. path: '/menu-test/hidden/block'
  387. defaults:
  388. _title: 'Blocks'
  389. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  390. requirements:
  391. _access: 'TRUE'
  392. menu_test.hidden_block_add:
  393. path: '/menu-test/hidden/block/add'
  394. defaults:
  395. _title: 'Add block'
  396. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  397. requirements:
  398. _access: 'TRUE'
  399. menu_test.hidden_block_configure:
  400. path: '/menu-test/hidden/block/manage/{foo}/{bar}'
  401. defaults:
  402. _title: 'Configure block'
  403. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  404. requirements:
  405. _access: 'TRUE'
  406. menu_test.hidden_block_delete:
  407. path: '/menu-test/hidden/block/manage/{foo}/{bar}/delete'
  408. defaults:
  409. _title: 'Configure block'
  410. _controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
  411. requirements:
  412. _access: 'TRUE'
  413. menu_test.theme_callback:
  414. path: '/menu-test/theme-callback/{inherited}'
  415. defaults:
  416. _title: 'Page that displays different themes'
  417. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  418. requirements:
  419. _access: 'TRUE'
  420. menu_test.no_theme_callback:
  421. path: '/menu-test/no-theme-callback'
  422. defaults:
  423. _title: 'Page that displays different themes without using a theme negotiation.'
  424. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  425. inherited: false
  426. requirements:
  427. _access: 'TRUE'
  428. menu_test.exotic_path:
  429. # "Special" ASCII characters, characters that look like a percent-escaped
  430. # string, and characters from various non-ASCII alphabets.
  431. # @todo Find a way to use the correct path.
  432. # cSpell:disable-next-line
  433. #path: "/menu-test/ -._~!$'\"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞"
  434. path: '/menu-test/{exotic}'
  435. defaults:
  436. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  437. requirements:
  438. exotic: '.+'
  439. _access: 'TRUE'
  440. menu_test.theme_callback_inheritance:
  441. path: '/menu-test/theme-callback/{inherited}/inheritance'
  442. defaults:
  443. _title: 'Page that tests theme negotiation inheritance.'
  444. _controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
  445. requirements:
  446. _access: 'TRUE'
  447. menu_test.title_test_case1:
  448. path: '/menu-title-test/case1'
  449. defaults:
  450. _title: 'Example title - Case 1'
  451. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  452. requirements:
  453. _access: 'TRUE'
  454. menu_test.title_test_case2:
  455. path: '/menu-title-test/case2'
  456. defaults:
  457. _title: 'Example title'
  458. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::titleCallback'
  459. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  460. requirements:
  461. _access: 'TRUE'
  462. menu_test.title_test_case3:
  463. path: '/menu-title-test/case3'
  464. defaults:
  465. _title: 'Bike sheds full of blue smurfs' # this should be ignored
  466. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::titleCallback'
  467. _title_arguments:
  468. title: 'Example title'
  469. case_number: '3'
  470. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  471. requirements:
  472. _access: 'TRUE'
  473. menu_test.context:
  474. path: '/menu-test/context'
  475. defaults:
  476. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  477. requirements:
  478. _access: 'TRUE'
  479. menu_test.custom:
  480. path: '/menu-test/custom'
  481. defaults:
  482. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  483. requirements:
  484. _access: 'TRUE'
  485. menu_test.breadcrumb1:
  486. path: '/menu-test/breadcrumb1'
  487. defaults:
  488. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  489. _title: '<script>alert(12);</script>'
  490. requirements:
  491. _access: 'TRUE'
  492. menu_test.breadcrumb2:
  493. path: '/menu-test/breadcrumb1/breadcrumb2'
  494. defaults:
  495. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  496. _title_callback: '\Drupal\menu_test\Controller\MenuTestController::breadcrumbTitleCallback'
  497. requirements:
  498. _access: 'TRUE'
  499. menu_test.breadcrumb3:
  500. path: '/menu-test/breadcrumb1/breadcrumb2/breadcrumb3'
  501. defaults:
  502. _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
  503. _title: 'Normal title'
  504. requirements:
  505. _access: 'TRUE'

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