function Http4xxController::on403
The default 403 content.
Return value
array A render array containing the message to display for 403 pages.
File
- 
              core/
modules/ system/ src/ Controller/ Http4xxController.php, line 42  
Class
- Http4xxController
 - Controller for default HTTP 4xx responses.
 
Namespace
Drupal\system\ControllerCode
public function on403() {
  return [
    '#markup' => $this->t('You are not authorized to access this page.'),
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.