vendor/shopware/elasticsearch/Product/SearchKeywordReplacement.php line 35

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Elasticsearch\Product;
  3. use Shopware\Core\Content\Product\DataAbstractionLayer\SearchKeywordUpdater;
  4. use Shopware\Core\Framework\Context;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Shopware\Elasticsearch\Framework\ElasticsearchHelper;
  7. #[Package('core')]
  8. class SearchKeywordReplacement extends SearchKeywordUpdater
  9. {
  10.     private SearchKeywordUpdater $decorated;
  11.     private ElasticsearchHelper $helper;
  12.     /**
  13.      * @internal
  14.      */
  15.     public function __construct(SearchKeywordUpdater $decoratedElasticsearchHelper $helper)
  16.     {
  17.         $this->decorated $decorated;
  18.         $this->helper $helper;
  19.     }
  20.     /**
  21.      * @param array<string> $ids
  22.      */
  23.     public function update(array $idsContext $context): void
  24.     {
  25.         if ($this->helper->allowIndexing()) {
  26.             return;
  27.         }
  28.         $this->decorated->update($ids$context);
  29.     }
  30.     public function reset(): void
  31.     {
  32.         $this->decorated->reset();
  33.     }
  34. }