You are here

protected function WebformEditorialController::response in Webform 8.5

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 WebformEditorialController::response()
WebformEditorialController::drush in modules/webform_editorial/src/Controller/WebformEditorialController.php
Returns webform drush.
WebformEditorialController::elements in modules/webform_editorial/src/Controller/WebformEditorialController.php
Returns webform elements editorial.
WebformEditorialController::help in modules/webform_editorial/src/Controller/WebformEditorialController.php
Returns webform help editorial.
WebformEditorialController::libraries in modules/webform_editorial/src/Controller/WebformEditorialController.php
Returns webform libraries.
WebformEditorialController::schema in modules/webform_editorial/src/Controller/WebformEditorialController.php
Returns webform schema.

... See full list

File

modules/webform_editorial/src/Controller/WebformEditorialController.php, line 529

Class

WebformEditorialController
Provides route responses for webform editorial.

Namespace

Drupal\webform_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);
}