Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Render / MainContent / MainContentRendererInterface.php
1 <?php
2
3 namespace Drupal\Core\Render\MainContent;
4
5 use Drupal\Core\Routing\RouteMatchInterface;
6 use Symfony\Component\HttpFoundation\Request;
7
8 /**
9  * The interface for "main content" (@code _controller @endcode) renderers.
10  *
11  * Classes implementing this interface are able to render the main content (as
12  * received from controllers) into a response of  a certain format
13  * (HTML, JSON …) and/or in a certain decorated manner (e.g. in the case of the
14  * default HTML main content renderer: with a page display variant applied).
15  */
16 interface MainContentRendererInterface {
17
18   /**
19    * Renders the main content render array into a response.
20    *
21    * @param array $main_content
22    *   The render array representing the main content.
23    * @param \Symfony\Component\HttpFoundation\Request $request
24    *   The request object, for context.
25    * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
26    *   The route match, for context.
27    *
28    * @return \Symfony\Component\HttpFoundation\Response
29    *   The Response in the format that this implementation supports.
30    */
31   public function renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match);
32
33 }