You are here

protected function WebformTestEditorialController::response in Webform 6.x

Build a custom response the returns raw HTML markup.

Parameters

array $build: A renderable array.

Return value

\Symfony\Component\HttpFoundation\Response a custom response that contains raw HTML markup.

6 calls to WebformTestEditorialController::response()
WebformTestEditorialController::drush in tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php
Returns webform drush.
WebformTestEditorialController::elements in tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php
Returns webform elements editorial.
WebformTestEditorialController::help in tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php
Returns webform help editorial.
WebformTestEditorialController::libraries in tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php
Returns webform libraries.
WebformTestEditorialController::schema in tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php
Returns webform schema.

... See full list

File

tests/modules/webform_test_editorial/src/Controller/WebformTestEditorialController.php, line 491

Class

WebformTestEditorialController
Provides route responses for webform editorial.

Namespace

Drupal\webform_test_editorial\Controller

Code

protected function response(array $build) {
  $output = $this->renderer
    ->renderPlain($build);
  $headers = [
    'Content-Length' => strlen($output),
    'Content-Type' => 'text/html',
  ];
  return new Response($output, 200, $headers);
}