class AjaxRenderer implements MainContentRendererInterface (View source)

Default main content renderer for Ajax requests.

Properties

protected ElementInfoManagerInterface $elementInfoManager

The element info manager.

protected RendererInterface $renderer

The renderer.

Methods

__construct(ElementInfoManagerInterface $element_info_manager, RendererInterface $renderer)

Constructs a new AjaxRenderer instance.

Response
renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match)

Renders the main content render array into a response.

Details

__construct(ElementInfoManagerInterface $element_info_manager, RendererInterface $renderer)

Constructs a new AjaxRenderer instance.

Parameters

ElementInfoManagerInterface $element_info_manager

The element info manager.

RendererInterface $renderer

The renderer.

Response renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match)

Renders the main content render array into a response.

Parameters

array $main_content

The render array representing the main content.

Request $request

The request object, for context.

RouteMatchInterface $route_match

The route match, for context.

Return Value

Response

The Response in the format that this implementation supports.