CategoryTreeInterface
Magento\Catalog\Api\Data\CategoryTreeInterface
What it does
This interface defines the contract for representing a hierarchical category tree structure in Magento 2.
Developers use it when working with category data that includes parent-child relationships, such as building navigation menus, displaying category hierarchies, or managing category trees through the API.
It provides access to essential category properties like name, position, activity status, and nested child categories.
Public Methods
- getId()
- setId()
- getParentId()
- setParentId()
- getName()
- setName()
- getIsActive()
- setIsActive()
- getPosition()
- setPosition()
- getLevel()
- setLevel()
- getProductCount()
- setProductCount()
- getChildrenData()
- setChildrenData()