Category
Magento\Catalog\Model\ResourceModel\Category
What it does
This resource model handles all database operations for Magento 2 category entities.
Developers use this class to load, save, delete categories, manage category-product relationships, handle category tree operations (moving categories, getting children/parents), and retrieve category-related data.
It's the main interface for interacting with category data at the database level, including managing hierarchical structures and product associations.
Public Methods
- getEntityType()
- getCategoryProductTable()
- setStoreId()
- getStoreId()
- deleteChildren()
- getProductsPosition()
- getChildrenCount()
- checkId()
- verifyIds()
- getChildrenAmount()
- getIsActiveAttributeId()
- findWhereAttributeIs()
- getProductCount()
- getCategories()
- getParentCategories()
- getParentDesignCategory()
- getChildrenCategories()
- getChildren()
- getAllChildren()
- isInRootCategoryList()
- isForbiddenToDelete()
- getCategoryPathById()
- changeParent()
- countVisible()
- load()
- delete()
- save()
- getCategoryWithChildren()
- _resetState()