diff --git a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php index 0617064..f98fb71 100644 --- a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php @@ -49,7 +49,7 @@ class MainContentViewSubscriber implements EventSubscriberInterface { protected $mainContentRenderers; /** - * Url query attribute to indicate the wrapper used to render a request. + * URL query attribute to indicate the wrapper used to render a request. * * This controls wrapping the HTML content for example in a modal dialog. */ @@ -84,7 +84,8 @@ public function onViewRenderArray(GetResponseForControllerResultEvent $event) { // Render the controller result into a response if it's a render array. if (is_array($result) && ($request->query->has(static::WRAPPER_ENVELOPE) || $request->getRequestFormat() == 'html')) { $wrapper = $request->query->get(static::WRAPPER_ENVELOPE, 'html'); - // Fall back on HTML if we don't have a renderer. + + // Fall back to HTML if the requested wrapper envelope is not available. $wrapper = isset($this->mainContentRenderers[$wrapper]) ? $wrapper : 'html'; $renderer = $this->classResolver->getInstanceFromDefinition($this->mainContentRenderers[$wrapper]);