You are here

public function TrustedRedirectResponse::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php \Drupal\Core\Routing\TrustedRedirectResponse::__construct()

File

core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php, line 24

Class

TrustedRedirectResponse
Provides a redirect response which contains trusted URLs.

Namespace

Drupal\Core\Routing

Code

public function __construct($url, $status = 302, $headers = []) {
  $this->trustedUrls[$url] = TRUE;
  parent::__construct($url, $status, $headers);
}