public CustomPageExceptionHtmlSubscriber::on404(GetResponseForExceptionEvent $event)
Handles a 404 error for HTML.
\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.
Overrides DefaultExceptionHtmlSubscriber::on404
public function on404(GetResponseForExceptionEvent $event) { $custom_404_path = $this->configFactory->get('system.site')->get('page.404'); if (!empty($custom_404_path)) { $this->makeSubrequestToCustomPath($event, $custom_404_path, 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!CustomPageExceptionHtmlSubscriber.php/function/CustomPageExceptionHtmlSubscriber::on404/8.1.x