class TrustedRedirectResponse

Provides a redirect response which contains trusted URLs.

Use this class in case you know that you want to redirect to an external URL.

Hierarchy

File

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

Namespace

Drupal\Core\Routing

Members

Name Modifiers Type Description
CacheableResponseTrait::$cacheabilityMetadata protected property The cacheability metadata.
CacheableResponseTrait::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. Overrides CacheableResponseInterface::addCacheableDependency
CacheableResponseTrait::getCacheableMetadata public function Returns the cacheability metadata for this response. Overrides CacheableResponseInterface::getCacheableMetadata
CacheableSecuredRedirectResponse::fromResponse protected function Copies over the values from the given response. Overrides SecuredRedirectResponse::fromResponse
LocalAwareRedirectResponseTrait::$requestContext protected property The request context.
LocalAwareRedirectResponseTrait::getRequestContext protected function Returns the request context.
LocalAwareRedirectResponseTrait::isLocal protected function
LocalAwareRedirectResponseTrait::setRequestContext public function Sets the request context.
RedirectResponse::$targetUrl protected property
RedirectResponse::create public static function
RedirectResponse::getTargetUrl public function Returns the target URL.
SecuredRedirectResponse::createFromRedirectResponse public static function Copies an existing redirect response into a safe one.
SecuredRedirectResponse::setTargetUrl public function Sets the redirect target of this response. Overrides RedirectResponse::setTargetUrl
TrustedRedirectResponse::$trustedUrls protected property A list of trusted URLs, which are safe to redirect to.
TrustedRedirectResponse::isSafe protected function Returns whether the URL is considered as safe to redirect to. Overrides SecuredRedirectResponse::isSafe
TrustedRedirectResponse::setTrustedTargetUrl public function Sets the target URL to a trusted URL.
TrustedRedirectResponse::__construct public function Creates a redirect response so that it conforms to the rules defined for a redirect status code. Overrides RedirectResponse::__construct

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!TrustedRedirectResponse.php/class/TrustedRedirectResponse/8.1.x