You are here

public function WebformExceptionHtmlSubscriber::on403 in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/EventSubscriber/WebformExceptionHtmlSubscriber.php \Drupal\webform\EventSubscriber\WebformExceptionHtmlSubscriber::on403()

Handles a 403 error for HTML.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.

Overrides DefaultExceptionHtmlSubscriber::on403

File

src/EventSubscriber/WebformExceptionHtmlSubscriber.php, line 117

Class

WebformExceptionHtmlSubscriber
Event subscriber to redirect to login form when webform settings instruct to.

Namespace

Drupal\webform\EventSubscriber

Code

public function on403(GetResponseForExceptionEvent $event) {
  if ($event
    ->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) {
    return;
  }
  $this
    ->on403RedirectEntityAccess($event);
  $this
    ->on403RedirectPrivateFileAccess($event);
}