Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DefaultExceptionHtmlSubscriber.php

function 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 131

Class

DefaultExceptionHtmlSubscriber
Exception subscriber for handling core default HTML error pages.

Namespace

Drupal\Core\EventSubscriber

Code

public function on404(ExceptionEvent $event) {
    $this->makeSubrequest($event, '/system/404', Response::HTTP_NOT_FOUND);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal