W3cubDocs

/Drupal 8

public function DefaultExceptionHtmlSubscriber::on404

public DefaultExceptionHtmlSubscriber::on404(GetResponseForExceptionEvent $event)

Handles a 404 error for HTML.

Parameters

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

File

core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php, line 108

Class

DefaultExceptionHtmlSubscriber
Exception subscriber for handling core default HTML error pages.

Namespace

Drupal\Core\EventSubscriber

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!DefaultExceptionHtmlSubscriber.php/function/DefaultExceptionHtmlSubscriber::on404/8.1.x