CategoryUrlPathGenerator
Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator
What it does
This class generates and manages URL paths for categories in Magento 2's catalog system.
Developers use it when creating or updating categories to automatically build SEO-friendly URLs with proper path hierarchy (e.g., 'clothing/men/shirts') and handle URL suffixes configured in store settings.
It's essential for URL rewrite functionality and ensuring categories have correct, hierarchical URLs.
Public Methods
- getUrlPath()
- getUrlPathWithSuffix()
- getCanonicalUrlPath()
- getUrlKey()