Log in
Model

Tree

Magento\Catalog\Model\Category\Tree

What it does

This class retrieves and manages Magento 2 category data in a hierarchical tree structure.

Developers use it to build category navigation menus, display category trees in admin panels, or fetch nested category data with attributes like name, position, and product counts.

It handles loading category nodes from the database and converting them into a tree format with specified depth levels.

Public Methods

  • getRootNode()
  • getTree()