public function ExceptionController::on405Html

Processes a MethodNotAllowed exception into an HTTP 405 response.

Parameters

Symfony\Component\HttpKernel\Exception\FlattenException $exception: The flattened exception.

Symfony\Component\HttpFoundation\Request $request: The request object that triggered this exception.

File

drupal/core/lib/Drupal/Core/Controller/ExceptionController.php, line 71
Contains \Drupal\Core\Controller\ExceptionController.

Class

ExceptionController
This controller handles HTTP errors generated by the routing system.

Namespace

Drupal\Core\Controller

Code

public function on405Html(FlattenException $exception, Request $request) {
  return new Response('Method Not Allowed', 405);
}