default_format_test.routing.yml

Same filename in other branches
  1. 9 core/modules/system/tests/modules/default_format_test/default_format_test.routing.yml
  2. 8.9.x core/modules/system/tests/modules/default_format_test/default_format_test.routing.yml
  3. 11.x core/modules/system/tests/modules/default_format_test/default_format_test.routing.yml
core/modules/system/tests/modules/default_format_test/default_format_test.routing.yml

File

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

View source
  1. default_format_test.machine:
  2. path: '/default_format_test/machine'
  3. defaults:
  4. # Same controller + method!
  5. _controller: '\Drupal\default_format_test\DefaultFormatTestController::content'
  6. requirements:
  7. _access: 'TRUE'
  8. _format: 'json'
  9. default_format_test.human:
  10. path: '/default_format_test/human'
  11. defaults:
  12. # Same controller + method!
  13. _controller: '\Drupal\default_format_test\DefaultFormatTestController::content'
  14. requirements:
  15. _access: 'TRUE'
  16. _format: 'html'
  17. # Route definition identical to default_format_test.machine, only different name.
  18. # @see \Drupal\FunctionalTests\Routing\DefaultFormatTest::testMultiple
  19. default_format_test.machine.alias:
  20. path: '/default_format_test/machine'
  21. defaults:
  22. # Same controller + method!
  23. _controller: '\Drupal\default_format_test\DefaultFormatTestController::content'
  24. requirements:
  25. _access: 'TRUE'
  26. _format: 'json'

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