You are here

protected function CustomErrorController::getRequest in Customerror 8

Gets the request object.

Return value

\Symfony\Component\HttpFoundation\Request The request object.

File

src/Controller/CustomErrorController.php, line 132

Class

CustomErrorController
Controller for errors pages.

Namespace

Drupal\customerror\Controller

Code

protected function getRequest() {
  if (!$this->requestStack) {
    $this->requestStack = \Drupal::service('request_stack');
  }
  return $this->requestStack
    ->getCurrentRequest();
}