function LocalAwareRedirectResponseTrait::setRequestContext

Same name in other branches
  1. 9 core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php \Drupal\Core\Routing\LocalAwareRedirectResponseTrait::setRequestContext()
  2. 8.9.x core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php \Drupal\Core\Routing\LocalAwareRedirectResponseTrait::setRequestContext()
  3. 10 core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php \Drupal\Core\Routing\LocalAwareRedirectResponseTrait::setRequestContext()

Sets the request context.

Parameters

\Drupal\Core\Routing\RequestContext $request_context: The request context.

Return value

$this

File

core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php, line 54

Class

LocalAwareRedirectResponseTrait
Provides a trait which ensures that a URL is safe to redirect to.

Namespace

Drupal\Core\Routing

Code

public function setRequestContext(RequestContext $request_context) {
    $this->requestContext = $request_context;
    return $this;
}

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