/** * {@inheritdoc} */ public function executeList(array $ids) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'executeList'); if (!$pluginInfo) { return parent::executeList($ids); } else { return $this->___callPlugins('executeList', func_get_args(), $pluginInfo); } }
/** * @param array $configurableIds * @param \Magento\CatalogRule\Model\Indexer\Product\ProductRuleIndexer $subject * * @return array */ private function reindexSubProducts(array $configurableIds, \Magento\CatalogRule\Model\Indexer\Product\ProductRuleIndexer $subject) { $subProducts = []; if ($configurableIds) { $subProducts = array_values($this->configurable->getChildrenIds($configurableIds)[0]); if ($subProducts) { $subject->executeList($subProducts); } } return $subProducts; }
/** * @param array $ids * @param array $idsForIndexer * @dataProvider dataProviderForExecuteList */ public function testDoExecuteList($ids, $idsForIndexer) { $this->indexBuilder->expects($this->once())->method('reindexByIds')->with($idsForIndexer); $this->indexer->executeList($ids); }
/** * @param array $ids * @param array $idsForIndexer * @dataProvider dataProviderForExecuteList */ public function testDoExecuteList($ids, $idsForIndexer) { $this->indexBuilder->expects($this->once())->method('reindexByIds')->with($idsForIndexer); $this->cacheContextMock->expects($this->once())->method('registerEntities')->with(\Magento\Catalog\Model\Product::CACHE_TAG, $ids); $this->indexer->executeList($ids); }