public function ViewsMegarowResponseRenderer::renderResponse in Views Megarow 8
The entire HTML: takes a #type 'page' and wraps it in a #type 'html'.
Overrides HtmlRenderer::renderResponse
File
- src/
Core/ ViewsMegarowResponseRenderer.php, line 19
Class
- ViewsMegarowResponseRenderer
- Converts a controller result into an Views Megarow response object.
Namespace
Drupal\views_megarow\CoreCode
public function renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match) {
$content = $this->renderer
->render($main_content);
// Set the generator in the HTTP header.
list($version) = explode('.', \Drupal::VERSION, 2);
return new Response($content, 200, [
'X-Generator' => 'Drupal ' . $version . ' (http://drupal.org)',
]);
}