class DialogRenderer implements MainContentRendererInterface (View source)

Default main content renderer for dialog requests.

Properties

protected TitleResolverInterface $titleResolver

The title resolver.

protected RendererInterface $renderer

The renderer.

Methods

__construct(TitleResolverInterface $title_resolver, RendererInterface $renderer)

Constructs a new DialogRenderer.

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

Renders the main content render array into a response.

string
determineTargetSelector(array $options, RouteMatchInterface $route_match)

Determine the target selector for the OpenDialogCommand.

Details

__construct(TitleResolverInterface $title_resolver, RendererInterface $renderer)

Constructs a new DialogRenderer.

Parameters

TitleResolverInterface $title_resolver

The title resolver.

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.

protected string determineTargetSelector(array $options, RouteMatchInterface $route_match)

Determine the target selector for the OpenDialogCommand.

Parameters

array $options

The 'target' option, if set, is used, and then removed from $options.

RouteMatchInterface $route_match

When no 'target' option is set in $options, $route_match is used instead to determine the target.

Return Value

string

The target selector.