Factory

StockFactory

Magento\CatalogInventory\Model\ResourceModel\Indexer\StockFactory

What it does

This factory class creates stock indexer objects for CatalogInventory, which handle the indexing of product stock data.

Developers would use this when they need to instantiate different types of stock indexers, with it defaulting to the DefaultStock indexer if no specific type is specified.

Note that this class is deprecated as of Magento 2.3.0 and has been replaced by Multi Source Inventory (MSI).

Public Methods

  • create()