You are here

public function WebformDefaultExceptionHtmlSubscriber::on403 in Webform 6.x

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

Handles a 403 error for HTML.

Parameters

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

Overrides DefaultExceptionHtmlSubscriber::on403

File

src/EventSubscriber/WebformDefaultExceptionHtmlSubscriber.php, line 117

Class

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

Namespace

Drupal\webform\EventSubscriber

Code

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