MainContentViewSubscriber::onViewRenderArray

public MainContentViewSubscriber::onViewRenderArray(GetResponseForControllerResultEvent $event) Sets a response given a (main content) render array. Parameters \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event: The event to process. File core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php, line 78 Class MainContentViewSubscriber View subscriber rendering main content render arrays into responses. Namespace Drupal\Core\EventSubscriber Code pu

MainContentViewSubscriber::getSubscribedEvents

static MainContentViewSubscriber::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) a

MainContentViewSubscriber::$routeMatch

The current route match. Type: \Drupal\Core\Routing\RouteMatchInterface File core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php, line 39 Class MainContentViewSubscriber View subscriber rendering main content render arrays into responses. Namespace Drupal\Core\EventSubscriber Code protected $routeMatch;

MainContentViewSubscriber::$mainContentRenderers

The available main content renderer services, keyed per format. Type: array File core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php, line 46 Class MainContentViewSubscriber View subscriber rendering main content render arrays into responses. Namespace Drupal\Core\EventSubscriber Code protected $mainContentRenderers;

MainContentViewSubscriber::$classResolver

The class resolver service. Type: \Drupal\Core\Controller\ControllerResolverInterface File core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php, line 32 Class MainContentViewSubscriber View subscriber rendering main content render arrays into responses. Namespace Drupal\Core\EventSubscriber Code protected $classResolver;

MainContentViewSubscriber

View subscriber rendering main content render arrays into responses. Additional target rendering formats can be defined by adding another service that implements \Drupal\Core\Render\MainContent\MainContentRendererInterface and tagging it as a render.main_content_renderer , then \Drupal\Core\Render\MainContent\MainContentRenderersPass will detect it and use it when appropriate. Hierarchy class \Drupal\Core\EventSubscriber\MainContentViewSubscriber implements EventSubscriberInterface See als

MainContentRenderersPass::process

public MainContentRenderersPass::process(ContainerBuilder $container) Collects the available main content renderer service IDs into the main_content_renderers parameter, keyed by format. Overrides CompilerPassInterface::process File core/lib/Drupal/Core/Render/MainContent/MainContentRenderersPass.php, line 19 Class MainContentRenderersPass Adds main_content_renderers parameter to the container. Namespace Drupal\Core\Render\MainContent Code public function process(ContainerBuilder $con

MainContentRenderersPass

Adds main_content_renderers parameter to the container. Hierarchy class \Drupal\Core\Render\MainContent\MainContentRenderersPass implements CompilerPassInterface File core/lib/Drupal/Core/Render/MainContent/MainContentRenderersPass.php, line 11 Namespace Drupal\Core\Render\MainContent Members Name Modifiers Type Description MainContentRenderersPass::process public function Collects the available main content renderer service IDs into the main_content_renderers parameter,

MainContentRendererInterface::renderResponse

public MainContentRendererInterface::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. \Symfony\Component\HttpFoundation\Request $request: The request object, for context. \Drupal\Core\Routing\RouteMatchInterface $route_match: The route match, for context. Return value \Symfony\Component\HttpFoundation\Response The Respons

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 File core/lib/Drupal/Core/Render/MainContent/MainContentRenderer