public function RemovePageThemeWrapperSubscriber::onViewRenderArray in Acquia Content Hub 8
Modifies render array for D8.
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event: Controller result event.
Overrides MainContentViewSubscriber::onViewRenderArray
File
- src/
EventSubscriber/ View/ RemovePageThemeWrapperSubscriber.php, line 34
Class
- RemovePageThemeWrapperSubscriber
- Subscriber to Remove Page Theme Wrapper.
Namespace
Drupal\acquia_contenthub\EventSubscriber\ViewCode
public function onViewRenderArray(GetResponseForControllerResultEvent $event) {
$request = $event
->getRequest();
if ($request->attributes
->all()['_route'] === 'acquia_contenthub.content_entity_display.entity') {
parent::onViewRenderArray($event);
$event
->getResponse()
->setContent(self::removeSurroundingMarkup('dialog-off-canvas-main-canvas', $event
->getResponse()
->getContent()));
}
}