protected SecuredRedirectResponse::fromResponse(RedirectResponse $response)
Copies over the values from the given response.
Parameters
\Symfony\Component\HttpFoundation\RedirectResponse $response: The redirect reponse object.
File
- core/lib/Drupal/Component/HttpFoundation/SecuredRedirectResponse.php, line 41
Class
- SecuredRedirectResponse
- Provides a common base class for safe redirects.
Namespace
Drupal\Component\HttpFoundation
Code
protected function fromResponse(RedirectResponse $response) { $this->setProtocolVersion($response->getProtocolVersion()); $this->setCharset($response->getCharset()); // Cookies are separate from other headers and have to be copied over // directly. foreach ($response->headers->getCookies() as $cookie) { $this->headers->setCookie($cookie); } }
Please login to continue.