testing_example.routing.yml 689 B

12345678910111213141516171819
  1. # This route is to a page explaining the module.
  2. testing_example.description:
  3. path: 'examples/testing-example'
  4. defaults:
  5. _controller: '\Drupal\testing_example\Controller\TestingExampleController::description'
  6. requirements:
  7. _permission: 'access content'
  8. # This route displays a sum of two numbers in terms of how many hands are
  9. # required to count it.
  10. testing_example.sum_in_hands:
  11. path: 'examples/testing-example/sum-in-hands/{first}/{second}'
  12. defaults:
  13. _controller: '\Drupal\testing_example\Controller\ContrivedController::displayAddedNumbers'
  14. first: 23
  15. second: 77
  16. requirements:
  17. _permission: 'access content'
  18. first: '^[0-9]+'
  19. second: '^[0-9]+'