interface MainContentRendererInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php \Drupal\Core\Render\MainContent\MainContentRendererInterface
The interface for "main content" (
_controller;
) renderers.
Classes implementing this interface are able to render the main content (as received from controllers) into a response of a certain format (HTML, JSON …) and/or in a certain decorated manner (e.g. in the case of the default HTML main content renderer: with a page display variant applied).
Hierarchy
- interface \Drupal\Core\Render\MainContent\MainContentRendererInterface
Expanded class hierarchy of MainContentRendererInterface
All classes that implement MainContentRendererInterface
2 files declare their use of MainContentRendererInterface
- FormAjaxResponseBuilder.php in core/
lib/ Drupal/ Core/ Form/ FormAjaxResponseBuilder.php - Contains \Drupal\Core\Form\FormAjaxResponseBuilder.
- JsonRenderer.php in core/
modules/ system/ tests/ modules/ common_test/ src/ Render/ MainContent/ JsonRenderer.php - Contains \Drupal\common_test\Render\MainContent\JsonRenderer.
File
- core/
lib/ Drupal/ Core/ Render/ MainContent/ MainContentRendererInterface.php, line 21 - Contains \Drupal\Core\Render\MainContent\MainContentRendererInterface.
Namespace
Drupal\Core\Render\MainContentView source
interface MainContentRendererInterface {
/**
* Renders the main content render array into a response.
*
* @param array $main_content
* The render array representing the main content.
* @param \Symfony\Component\HttpFoundation\Request $request
* The request object, for context.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match, for context.
*
* @return \Symfony\Component\HttpFoundation\Response
* The Response in the format that this implementation supports.
*/
public function renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MainContentRendererInterface:: |
public | function | Renders the main content render array into a response. | 4 |