Log in
Model

Flat

Magento\Catalog\Model\ResourceModel\Category\Flat

What it does

This class manages Magento 2's flat category table structure, which provides optimized read performance for category operations.

Developers use this resource model when working with the flat category indexer to retrieve category hierarchies, build navigation menus, get parent/child relationships, and fetch category data without complex EAV joins.

It's primarily used in frontend catalog operations where fast category lookups are needed.

Public Methods

  • setStoreId()
  • getStoreId()
  • getMainTable()
  • getMainStoreTable()
  • addInactiveCategoryIds()
  • getInactiveCategoryIds()
  • addChildNodes()
  • getNodes()
  • getCategories()
  • getNodeById()
  • getAttribute()
  • getChildrenAmount()
  • getProductCount()
  • getParentCategories()
  • getParentDesignCategory()
  • getChildrenCategories()
  • isInRootCategoryList()
  • getChildren()
  • getAllChildren()
  • checkId()
  • getAnchorsAbove()
  • getProductsPosition()