function Http4xxController::on404
Same name in other branches
- 9 core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on404()
- 10 core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on404()
- 11.x core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on404()
The default 404 content.
Return value
array A render array containing the message to display for 404 pages.
File
-
core/
modules/ system/ src/ Controller/ Http4xxController.php, line 54
Class
- Http4xxController
- Controller for default HTTP 4xx responses.
Namespace
Drupal\system\ControllerCode
public function on404() {
return [
'#markup' => $this->t('The requested page could not be found.'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.