public EnforcedFormResponseSubscriber::onKernelException(GetResponseForExceptionEvent $event)
Replaces the response in case an EnforcedResponseException was thrown.
public function onKernelException(GetResponseForExceptionEvent $event) { if ($response = EnforcedResponse::createFromException($event->getException())) { // Setting the response stops the event propagation. $event->setResponse($response); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!EnforcedFormResponseSubscriber.php/function/EnforcedFormResponseSubscriber::onKernelException/8.1.x