function TrustedRedirectResponse::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php \Drupal\Core\Routing\TrustedRedirectResponse::__construct()
  2. 10 core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php \Drupal\Core\Routing\TrustedRedirectResponse::__construct()
  3. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.