ajax_example.routing.yml

Same filename in other branches
  1. 3.x modules/ajax_example/ajax_example.routing.yml
modules/ajax_example/ajax_example.routing.yml
13 string references to YAML keys in ajax_example.routing.yml
AjaxExampleController::renderLinkRenderableArray in modules/ajax_example/src/Controller/AjaxExampleController.php
Demonstrates a clickable AJAX-enabled link using the 'use-ajax' class.
AjaxExampleMenuTest::testAjaxExampleLinks in modules/ajax_example/tests/src/Functional/AjaxExampleMenuTest.php
Tests links.
AjaxWizardTest::testWizardPreviousStepsValues in modules/ajax_example/tests/src/FunctionalJavascript/AjaxWizardTest.php
Test that the previous values are correctly displayed.
AjaxWizardTest::testWizardSteps in modules/ajax_example/tests/src/FunctionalJavascript/AjaxWizardTest.php
Test that we can successfully submit the wizard following the steps.
AutotextfieldsTest::testAutotextfields in modules/ajax_example/tests/src/FunctionalJavascript/AutotextfieldsTest.php
Test the user interactions for the Autotextfields example.

... See full list

File

modules/ajax_example/ajax_example.routing.yml

View source
  1. ajax_example.description:
  2. path: '/examples/ajax-example'
  3. defaults:
  4. _controller: '\Drupal\ajax_example\Controller\AjaxExampleController::description'
  5. _title: 'AJAX Example'
  6. requirements:
  7. _permission: 'access content'
  8. ajax_example.simplest:
  9. path: '/examples/ajax-example/simplest'
  10. defaults:
  11. _form: '\Drupal\ajax_example\Form\Simplest'
  12. _title: 'Simplest AJAX example'
  13. requirements:
  14. _permission: 'access content'
  15. ajax_example.autotextfields:
  16. path: '/examples/ajax-example/autotextfields'
  17. defaults:
  18. _form: '\Drupal\ajax_example\Form\Autotextfields'
  19. _title: 'Generate textfields'
  20. requirements:
  21. _permission: 'access content'
  22. ajax_example.submit_driven_ajax:
  23. path: '/examples/ajax-example/submit-driven-ajax'
  24. defaults:
  25. _form: '\Drupal\ajax_example\Form\SubmitDriven'
  26. _title: 'Submit-driven AJAX'
  27. requirements:
  28. _permission: 'access content'
  29. ajax_example.dependent_dropdown:
  30. path: '/examples/ajax-example/dependent-dropdown/{nojs}'
  31. defaults:
  32. _form: '\Drupal\ajax_example\Form\DependentDropdown'
  33. _title: 'Dependent dropdown'
  34. nojs: ajax
  35. requirements:
  36. _permission: 'access content'
  37. ajax_example.dynamic_form_sections:
  38. path: '/examples/ajax-example/dynamic-form-sections/{nojs}'
  39. defaults:
  40. _form: '\Drupal\ajax_example\Form\DynamicFormSections'
  41. _title: 'Dynamic form sections'
  42. nojs: 'ajax'
  43. requirements:
  44. _permission: 'access content'
  45. ajax_example.wizard:
  46. path: '/examples/ajax-example/wizard'
  47. defaults:
  48. _form: '\Drupal\ajax_example\Form\Wizard'
  49. _title: 'Wizard with graceful degradation'
  50. requirements:
  51. _permission: 'access content'
  52. ajax_example.wizardnojs:
  53. path: '/examples/ajax-example/wizard-nojs/{no_js_use}'
  54. defaults:
  55. _form: '\Drupal\ajax_example\Form\Wizard'
  56. _title: 'Wizard with graceful degradation, w/JS turned off'
  57. no_js_use: TRUE
  58. requirements:
  59. _permission: 'access content'
  60. ajax_example.ajax_link_render:
  61. path: '/examples/ajax-example/ajax-link-renderable'
  62. defaults:
  63. _controller: '\Drupal\ajax_example\Controller\AjaxExampleController::renderLinkRenderableArray'
  64. _title: 'AJAX link from a render array'
  65. requirements:
  66. _permission: 'access content'
  67. # This route is for an AJAX callback. It is used by the AJAX system on
  68. # ajax_example.ajax_link_render. It has a {nojs} parameter, which gives us
  69. # a way to know whether the request is an AJAX request or is from some other
  70. # source.
  71. ajax_example.ajax_link_callback:
  72. path: '/examples/ajax-example/ajax-link-callback/{nojs}'
  73. defaults:
  74. _controller: '\Drupal\ajax_example\Controller\AjaxExampleController::ajaxLinkCallback'
  75. requirements:
  76. _permission: 'access content'
  77. ajax_example.autocomplete_user:
  78. path: '/examples/ajax_example/user_autocomplete'
  79. defaults:
  80. _form: '\Drupal\ajax_example\Form\EntityAutocomplete'
  81. _title: 'Autocomplete users with entity_autocomplete'
  82. requirements:
  83. _permission: 'access content'