Customer url model
Definition at line 17 of file Url.php.
◆ __construct()
- Parameters
-
Session | $customerSession | |
ScopeConfigInterface | $scopeConfig | |
RequestInterface | $request | |
UrlInterface | $urlBuilder | |
EncoderInterface | $urlEncoder | |
\Magento\Framework\Url\DecoderInterface | null | $urlDecoder | |
\Magento\Framework\Url\HostChecker | null | $hostChecker | |
Definition at line 78 of file Url.php.
93 ->get(\
Magento\Framework\Url\DecoderInterface::class);
95 ->get(\
Magento\Framework\Url\HostChecker::class);
◆ getAccountUrl()
Retrieve customer account page url
- Returns
- string
Definition at line 177 of file Url.php.
179 return $this->urlBuilder->getUrl(
'customer/account');
◆ getDashboardUrl()
Retrieve customer dashboard url
- Returns
- string
Definition at line 167 of file Url.php.
169 return $this->urlBuilder->getUrl(
'customer/account');
◆ getEditPostUrl()
Retrieve customer edit POST URL
- Returns
- string
Definition at line 217 of file Url.php.
219 return $this->urlBuilder->getUrl(
'customer/account/editpost');
◆ getEditUrl()
Retrieve customer account edit form url
- Returns
- string
Definition at line 207 of file Url.php.
209 return $this->urlBuilder->getUrl(
'customer/account/edit');
◆ getEmailConfirmationUrl()
getEmailConfirmationUrl |
( |
|
$email = null | ) |
|
Retrieve confirmation URL for Email
- Parameters
-
- Returns
- string
Definition at line 238 of file Url.php.
240 return $this->urlBuilder->getUrl(
'customer/account/confirmation', [
'_query' => [
'email' =>
$email]]);
◆ getForgotPasswordUrl()
Retrieve url of forgot password page
- Returns
- string
Definition at line 227 of file Url.php.
229 return $this->urlBuilder->getUrl(
'customer/account/forgotpassword');
◆ getLoginPostUrl()
Retrieve customer login POST URL
- Returns
- string
Definition at line 140 of file Url.php.
143 $referer = $this->getRequestReferrer();
146 self::REFERER_QUERY_PARAM_NAME => $referer,
149 return $this->urlBuilder->getUrl(
'customer/account/loginPost',
$params);
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ getLoginUrl()
Retrieve customer login url
- Returns
- string
Definition at line 103 of file Url.php.
105 return $this->urlBuilder->getUrl(self::ROUTE_ACCOUNT_LOGIN, $this->
getLoginUrlParams());
◆ getLoginUrlParams()
Retrieve parameters of customer login url
- Returns
- array
Definition at line 113 of file Url.php.
116 $referer = $this->getRequestReferrer();
118 && !$this->scopeConfig->isSetFlag(
119 self::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD,
120 ScopeInterface::SCOPE_STORE
122 && !$this->customerSession->getNoReferer()
124 $referer = $this->urlBuilder->getUrl(
'*/*/*', [
'_current' =>
true,
'_use_rewrite' =>
true]);
125 $referer = $this->urlEncoder->encode($referer);
129 $params = [self::REFERER_QUERY_PARAM_NAME => $referer];
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ getLogoutUrl()
Retrieve customer logout url
- Returns
- string
Definition at line 157 of file Url.php.
159 return $this->urlBuilder->getUrl(
'customer/account/logout');
◆ getRegisterPostUrl()
Retrieve customer register form post url
- Returns
- string
Definition at line 197 of file Url.php.
199 return $this->urlBuilder->getUrl(
'customer/account/createpost');
◆ getRegisterUrl()
Retrieve customer register form url
- Returns
- string
Definition at line 187 of file Url.php.
189 return $this->urlBuilder->getUrl(
'customer/account/create');
◆ $customerSession
◆ $request
◆ $scopeConfig
◆ $urlBuilder
◆ $urlEncoder
◆ REFERER_QUERY_PARAM_NAME
const REFERER_QUERY_PARAM_NAME = 'referer' |
Query param name for last url visited
Definition at line 32 of file Url.php.
◆ ROUTE_ACCOUNT_LOGIN
const ROUTE_ACCOUNT_LOGIN = 'customer/account/login' |
Route for customer account login page
Definition at line 22 of file Url.php.
◆ XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD
const XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD = 'customer/startup/redirect_dashboard' |
The documentation for this class was generated from the following file:
- vendor/magento/module-customer/Model/Url.php