public function DefaultExceptionHtmlSubscriber::on404 in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php \Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber::on404()
Handles a 404 error for HTML.
Parameters
\Symfony\Component\HttpKernel\Event\ExceptionEvent $event: The event to process.
1 method overrides DefaultExceptionHtmlSubscriber::on404()
- CustomPageExceptionHtmlSubscriber::on404 in core/
lib/ Drupal/ Core/ EventSubscriber/ CustomPageExceptionHtmlSubscriber.php - Handles a 404 error for HTML.
File
- core/
lib/ Drupal/ Core/ EventSubscriber/ DefaultExceptionHtmlSubscriber.php, line 121
Class
- DefaultExceptionHtmlSubscriber
- Exception subscriber for handling core default HTML error pages.
Namespace
Drupal\Core\EventSubscriberCode
public function on404(ExceptionEvent $event) {
$this
->makeSubrequest($event, '/system/404', Response::HTTP_NOT_FOUND);
}