Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\App\RequestInterface $request, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Encryption\UrlCoder $urlCoder, \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\UrlInterface $urlBuilder, $canUseSessionIdInParam=true) | |
getRefererUrl () | |
getRedirectUrl ($defaultUrl=null) | |
error ($defaultUrl) | |
success ($defaultUrl) | |
updatePathParams (array $arguments) | |
redirect (\Magento\Framework\App\ResponseInterface $response, $path, $arguments=[]) | |
![]() | |
redirect (\Magento\Framework\App\ResponseInterface $response, $path, $arguments=[]) | |
Protected Member Functions | |
_getUrl () | |
_isUrlInternal ($url) | |
normalizeRefererUrl ($refererUrl) | |
normalizeRefererQueryParts ($refererQuery) | |
Protected Attributes | |
$_request | |
$_storeManager | |
$_urlCoder | |
$_session | |
$_sidResolver | |
$_canUseSessionIdInParam | |
$_urlBuilder | |
Additional Inherited Members | |
![]() | |
const | PARAM_NAME_REFERER_URL = 'referer_url' |
const | PARAM_NAME_ERROR_URL = 'error_url' |
const | PARAM_NAME_SUCCESS_URL = 'success_url' |
Class Redirect computes redirect urls responses.
Definition at line 13 of file Redirect.php.
__construct | ( | \Magento\Framework\App\RequestInterface | $request, |
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Framework\Encryption\UrlCoder | $urlCoder, | ||
\Magento\Framework\Session\SessionManagerInterface | $session, | ||
\Magento\Framework\Session\SidResolverInterface | $sidResolver, | ||
\Magento\Framework\UrlInterface | $urlBuilder, | ||
$canUseSessionIdInParam = true |
|||
) |
Constructor
\Magento\Framework\App\RequestInterface | $request | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\Encryption\UrlCoder | $urlCoder | |
\Magento\Framework\Session\SessionManagerInterface | $session | |
\Magento\Framework\Session\SidResolverInterface | $sidResolver | |
\Magento\Framework\UrlInterface | $urlBuilder | |
bool | $canUseSessionIdInParam |
Definition at line 61 of file Redirect.php.
|
protected |
Get the referrer url.
Definition at line 85 of file Redirect.php.
|
protected |
Check whether URL is internal
string | $url |
Definition at line 197 of file Redirect.php.
error | ( | $defaultUrl | ) |
Redirect to error page
string | $defaultUrl |
Implements RedirectInterface.
Definition at line 139 of file Redirect.php.
getRedirectUrl | ( | $defaultUrl = null | ) |
Set referer url for redirect in response
string | $defaultUrl |
Implements RedirectInterface.
Definition at line 124 of file Redirect.php.
getRefererUrl | ( | ) |
Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param)
Implements RedirectInterface.
Definition at line 113 of file Redirect.php.
|
protected |
Normalize special parts of referer query
array | $refererQuery |
Definition at line 246 of file Redirect.php.
|
protected |
Normalize path to avoid wrong store change
string | $refererUrl |
Definition at line 214 of file Redirect.php.
redirect | ( | \Magento\Framework\App\ResponseInterface | $response, |
$path, | |||
$arguments = [] |
|||
) |
Set redirect into response
\Magento\Framework\App\ResponseInterface | $response | |
string | $path | |
array | $arguments |
Definition at line 185 of file Redirect.php.
success | ( | $defaultUrl | ) |
Redirect to success page
string | $defaultUrl |
Implements RedirectInterface.
Definition at line 157 of file Redirect.php.
updatePathParams | ( | array | $arguments | ) |
Update path params for url builder
array | $arguments |
Implements RedirectInterface.
Definition at line 172 of file Redirect.php.
|
protected |
Definition at line 43 of file Redirect.php.
|
protected |
Definition at line 18 of file Redirect.php.
|
protected |
Definition at line 33 of file Redirect.php.
|
protected |
Definition at line 38 of file Redirect.php.
|
protected |
Definition at line 23 of file Redirect.php.
|
protected |
Definition at line 48 of file Redirect.php.
|
protected |
Definition at line 28 of file Redirect.php.