function CustomPageExceptionHtmlSubscriber::on403
Same name in other branches
- 9 core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber::on403()
- 10 core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber::on403()
- 11.x core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber::on403()
Overrides DefaultExceptionHtmlSubscriber::on403
File
-
core/
lib/ Drupal/ Core/ EventSubscriber/ CustomPageExceptionHtmlSubscriber.php, line 68
Class
- CustomPageExceptionHtmlSubscriber
- Exception subscriber for handling core custom HTML error pages.
Namespace
Drupal\Core\EventSubscriberCode
public function on403(GetResponseForExceptionEvent $event) {
$custom_403_path = $this->configFactory
->get('system.site')
->get('page.403');
if (!empty($custom_403_path)) {
$this->makeSubrequestToCustomPath($event, $custom_403_path, Response::HTTP_FORBIDDEN);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.