Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / src / Controller / Http4xxController.php
1 <?php
2
3 namespace Drupal\system\Controller;
4
5 use Drupal\Core\Controller\ControllerBase;
6
7 /**
8  * Controller for default HTTP 4xx responses.
9  */
10 class Http4xxController extends ControllerBase {
11
12   /**
13    * The default 401 content.
14    *
15    * @return array
16    *   A render array containing the message to display for 401 pages.
17    */
18   public function on401() {
19     return [
20       '#markup' => $this->t('Please log in to access this page.'),
21     ];
22   }
23
24   /**
25    * The default 403 content.
26    *
27    * @return array
28    *   A render array containing the message to display for 403 pages.
29    */
30   public function on403() {
31     return [
32       '#markup' => $this->t('You are not authorized to access this page.'),
33     ];
34   }
35
36   /**
37    * The default 404 content.
38    *
39    * @return array
40    *   A render array containing the message to display for 404 pages.
41    */
42   public function on404() {
43     return [
44       '#markup' => $this->t('The requested page could not be found.'),
45     ];
46   }
47
48 }