Model
Url
Magento\Customer\Model\Url
What it does
This class provides a centralized way to generate all customer-related URLs in Magento 2, including login, registration, account dashboard, logout, password reset, and account edit URLs.
Developers use this class when they need to create links to customer account pages in templates, controllers, or other business logic, ensuring consistent URL generation with proper parameters like referer tracking for redirects after login.
Public Methods
- getLoginUrl()
- getLoginUrlParams()
- getLoginPostUrl()
- getLogoutUrl()
- getDashboardUrl()
- getAccountUrl()
- getRegisterUrl()
- getRegisterPostUrl()
- getEditUrl()
- getEditPostUrl()
- getForgotPasswordUrl()
- getEmailConfirmationUrl()