function DefaultExceptionHtmlSubscriber::on401
Same name in other branches
- 9 core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber::on401()
- 10 core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber::on401()
- 11.x core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber::on401()
Handles a 401 error for HTML.
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.
File
-
core/
lib/ Drupal/ Core/ EventSubscriber/ DefaultExceptionHtmlSubscriber.php, line 101
Class
- DefaultExceptionHtmlSubscriber
- Exception subscriber for handling core default HTML error pages.
Namespace
Drupal\Core\EventSubscriberCode
public function on401(GetResponseForExceptionEvent $event) {
$this->makeSubrequest($event, '/system/401', Response::HTTP_UNAUTHORIZED);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.