Slide 91
Slide 91 text
@antonioperic
Pipeline
1. After the controller returned a render array, the VIEW will be triggered by the HttpKernel, because
the controller result is not a Response, but a render array.
2. MainContentViewSubscriber is subscribed to the VIEW event. It checks whether the controller
result is an array, and if so, it guarantees to generate a Response.
3. Next, MainContentViewSubscriber checks whether the negotiated request format is supported:
1. Any format for which a main content renderer service exists (an implementation of
MainContentRendererInterface is supported.
2. If the negotiated request format is not supported, a 406 JSON response is generated, which lists
the supported formats in a machine-readable way (as per RFC 2616, section 10.4.7).
4. Otherwise, when the negotiated request format is supported, the corresponding main content
renderer service is initialized. A response is generated by calling
MainContentRendererInterface::renderResponse() on the service. That's it