function AjaxTestController::render
Returns a render array that will be rendered by AjaxRenderer.
Verifies that the response incorporates JavaScript settings generated during the page request by adding a dummy setting.
1 string reference to 'AjaxTestController::render'
- ajax_test.routing.yml in core/
modules/ system/ tests/ modules/ ajax_test/ ajax_test.routing.yml  - core/modules/system/tests/modules/ajax_test/ajax_test.routing.yml
 
File
- 
              core/
modules/ system/ tests/ modules/ ajax_test/ src/ Controller/ AjaxTestController.php, line 146  
Class
- AjaxTestController
 - Provides content for dialog tests.
 
Namespace
Drupal\ajax_test\ControllerCode
public function render() {
  return [
    '#attached' => [
      'library' => [
        'core/drupalSettings',
      ],
      'drupalSettings' => [
        'ajax' => 'test',
      ],
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.