Log in
Model

ChildrenCategoriesProvider

Magento\CatalogUrlRewrite\Model\Category\ChildrenCategoriesProvider

What it does

This class retrieves child categories of a given parent category in Magento 2.

Developers use it when generating URL rewrites for categories to ensure all child categories are included in the rewrite process.

It provides both the full category objects and just the IDs, with options for recursive (all descendants) or single-level retrieval.

Public Methods

  • getChildren()
  • getChildrenIds()
  • _resetState()