_productStockIndexerRow = $productStockIndexerRow; $this->_productStockIndexerRows = $productStockIndexerRows; $this->_productStockIndexerFull = $productStockIndexerFull; } /** * Execute materialization on ids entities * * @param int[] $ids * * @return void */ public function execute($ids) { $this->_productStockIndexerRows->execute($ids); $this->getCacheContext()->registerEntities(\Magento\Catalog\Model\Product::CACHE_TAG, $ids); } /** * Execute full indexation * * @return void */ public function executeFull() { $this->_productStockIndexerFull->execute(); $this->getCacheContext()->registerTags( [ \Magento\Catalog\Model\Category::CACHE_TAG, \Magento\Catalog\Model\Product::CACHE_TAG ] ); } /** * Execute partial indexation by ID list * * @param int[] $ids * * @return void */ public function executeList(array $ids) { $this->_productStockIndexerRows->execute($ids); } /** * Execute partial indexation by ID * * @param int $id * * @return void */ public function executeRow($id) { $this->_productStockIndexerRow->execute($id); } /** * Get cache context * * @return \Magento\Framework\Indexer\CacheContext * @deprecated 100.0.7 */ protected function getCacheContext() { if (!($this->cacheContext instanceof CacheContext)) { return \Magento\Framework\App\ObjectManager::getInstance()->get(CacheContext::class); } else { return $this->cacheContext; } } }