CurrentUrlRewritesRegenerator
Magento\CatalogUrlRewrite\Model\Category\CurrentUrlRewritesRegenerator
What it does
This class regenerates URL rewrites for categories when category URLs change, preserving old URLs as redirects if history saving is enabled.
Developers use this when categories are moved, renamed, or their URL keys are modified to ensure existing links continue to work and proper redirects are maintained.
It handles both auto-generated and custom URL rewrites, creating permanent redirects from old URLs to new ones.
Public Methods
- generate()