You are here

public function AjaxTestController::render in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php \Drupal\ajax_test\Controller\AjaxTestController::render()

Returns a render array that will be rendered by AjaxRenderer.

Ensures that \Drupal\Core\Ajax\AjaxResponse::ajaxRender() 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 57
Contains \Drupal\ajax_test\Controller\AjaxTestController.

Class

AjaxTestController
Provides content for dialog tests.

Namespace

Drupal\ajax_test\Controller

Code

public function render() {
  return [
    '#attached' => [
      'library' => [
        'core/drupalSettings',
      ],
      'drupalSettings' => [
        'ajax' => 'test',
      ],
    ],
  ];
}