3 namespace Drupal\system\Controller;
5 use Drupal\Core\Controller\ControllerBase;
8 * Controller for default HTTP 4xx responses.
10 class Http4xxController extends ControllerBase {
13 * The default 401 content.
16 * A render array containing the message to display for 401 pages.
18 public function on401() {
20 '#markup' => $this->t('Please log in to access this page.'),
25 * The default 403 content.
28 * A render array containing the message to display for 403 pages.
30 public function on403() {
32 '#markup' => $this->t('You are not authorized to access this page.'),
37 * The default 404 content.
40 * A render array containing the message to display for 404 pages.
42 public function on404() {
44 '#markup' => $this->t('The requested page could not be found.'),