コード例 #1
0
ファイル: Interceptor.php プロジェクト: rustamveer/magento2
 /**
  * {@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);
     }
 }
コード例 #2
0
 /**
  * @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;
 }
コード例 #3
0
 /**
  * @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);
 }
コード例 #4
0
 /**
  * @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);
 }