HtmlRenderer
class HtmlRenderer implements MainContentRendererInterface (View source)
Default main content renderer for HTML requests.
For attachment handling of HTML responses:
Properties
| protected TitleResolverInterface | $titleResolver | The title resolver. |
|
| protected PluginManagerInterface | $displayVariantManager | The display variant manager. |
|
| protected EventDispatcherInterface | $eventDispatcher | The event dispatcher. |
|
| protected ModuleHandlerInterface | $moduleHandler | The module handler. |
|
| protected RendererInterface | $renderer | The renderer service. |
|
| protected RenderCacheInterface | $renderCache | The render cache service. |
|
| protected array | $rendererConfig | The renderer configuration array. |
|
| protected ThemeManagerInterface | $themeManager | The theme manager. |
Methods
Constructs a new HtmlRenderer.
Renders the main content render array into a response.
Prepares the HTML body: wraps the main content in #type 'page'.
Invokes the page attachment hooks.
Invokes the page top and bottom hooks.
Details
__construct(TitleResolverInterface $title_resolver, PluginManagerInterface $display_variant_manager, EventDispatcherInterface $event_dispatcher, ModuleHandlerInterface $module_handler, RendererInterface $renderer, RenderCacheInterface $render_cache, array $renderer_config, ThemeManagerInterface $theme_manager = NULL)
Constructs a new HtmlRenderer.
Response
renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match)
Renders the main content render array into a response.
protected array
prepare(array $main_content, Request $request, RouteMatchInterface $route_match)
Prepares the HTML body: wraps the main content in #type 'page'.
invokePageAttachmentHooks(array $page)
| internal |
Invokes the page attachment hooks.
buildPageTopAndBottom(array $html)
| internal |
Invokes the page top and bottom hooks.