Model
Url
Magento\Catalog\Model\Product\Url
What it does
This class handles generating URLs for product pages in Magento 2.
It constructs SEO-friendly URLs using either URL rewrites from the database or fallback route parameters, and handles formatting URL keys with proper transliteration.
Developers use this when they need to programmatically get a product's frontend URL, such as in emails, feeds, or custom templates.
Public Methods
- getUrlInStore()
- getProductUrl()
- formatUrlKey()
- getUrl()