rest_example.routing.yml

Same filename in other branches
  1. 4.0.x modules/rest_example/rest_example.routing.yml
modules/rest_example/rest_example.routing.yml
3 string references to YAML keys in rest_example.routing.yml
RestExampleClientDelete::getCancelUrl in modules/rest_example/src/Form/RestExampleClientDelete.php
Returns the route to go to if the user cancels the action.
RestExampleClientDelete::submitForm in modules/rest_example/src/Form/RestExampleClientDelete.php
RestExampleClientEdit::submitForm in modules/rest_example/src/Form/RestExampleClientEdit.php

File

modules/rest_example/rest_example.routing.yml

View source
  1. # These routes are tells Drupal where to find the content/actions for each URL.
  2. # Description and help text.
  3. rest_example.getting_started:
  4. path: '/examples/rest-getting-started'
  5. defaults:
  6. _title: 'REST Example: Getting started'
  7. _controller: '\Drupal\rest_example\Controller\RestExampleHelpController::description'
  8. requirements:
  9. _permission: 'access content'
  10. # The client setup page.
  11. rest_example.client_settings:
  12. path: '/examples/rest-client-settings'
  13. defaults:
  14. _title: 'Connect to a remote Drupal site'
  15. _form: '\Drupal\rest_example\Form\RestExampleClientSettings'
  16. requirements:
  17. _permission: 'access content'
  18. # Listing of all the remote nodes, of the type rest_example_test.
  19. rest_example.client_actions_index:
  20. path: '/examples/rest-client-actions'
  21. defaults:
  22. _title: 'Nodes on the remote Drupal server'
  23. _controller: '\Drupal\rest_example\Controller\RestExampleClientController::indexAction'
  24. requirements:
  25. _permission: 'access content'
  26. # Create a new node on the remote server.
  27. rest_example.client_actions_create:
  28. path: '/examples/rest-client-actions/create'
  29. defaults:
  30. _title: 'Create node on remote Drupal server'
  31. _form: '\Drupal\rest_example\Form\RestExampleClientEdit'
  32. requirements:
  33. _permission: 'access content'
  34. # Edit a node on the remote server.
  35. rest_example.client_actions_edit:
  36. path: '/examples/rest-client-actions/edit/{id}'
  37. defaults:
  38. _title: 'Edit node on remote Drupal server'
  39. _form: '\Drupal\rest_example\Form\RestExampleClientEdit'
  40. requirements:
  41. _permission: 'access content'
  42. # Delete a node on the remote server.
  43. rest_example.client_actions_delete:
  44. path: '/examples/rest-client-actions/delete/{id}'
  45. defaults:
  46. _title: 'Delete node on remote Drupal server'
  47. _form: '\Drupal\rest_example\Form\RestExampleClientDelete'
  48. requirements:
  49. _permission: 'access content'