|
7 | 7 | use Magento\Catalog\Api\Data\ProductInterface; |
8 | 8 | use Magento\Catalog\Api\ProductRepositoryInterface; |
9 | 9 | use Magento\Catalog\Model\Product; |
10 | | -use Magento\CatalogInventory\Model\Stock\StockItemRepository as StockItem; |
11 | 10 | use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableProductType; |
12 | 11 | use Magento\Framework\Api\SearchCriteriaBuilder; |
| 12 | +use Magento\Inventory\Model\SourceItem\Command\GetSourceItemsBySku; |
13 | 13 | use Omikron\Factfinder\Api\Export\ExportEntityInterface; |
14 | 14 | use Omikron\Factfinder\Api\Filter\FilterInterface; |
15 | 15 | use Omikron\Factfinder\Model\Export\Catalog\Entity\ProductVariationFactory; |
|
18 | 18 | class ConfigurableDataProvider extends SimpleDataProvider |
19 | 19 | { |
20 | 20 | public function __construct( |
21 | | - protected Product $product, |
22 | | - protected NumberFormatter $numberFormatter, |
| 21 | + protected Product $product, |
| 22 | + protected NumberFormatter $numberFormatter, |
23 | 23 | private readonly ConfigurableProductType $productType, |
24 | 24 | private readonly FilterInterface $filter, |
25 | 25 | private readonly ProductVariationFactory $variationFactory, |
26 | 26 | private readonly ProductRepositoryInterface $productRepository, |
27 | 27 | private readonly SearchCriteriaBuilder $builder, |
28 | | - StockItem $stockItem, |
29 | | - protected array $productFields = [] |
| 28 | + protected GetSourceItemsBySku $getSourceItemsBySku, |
| 29 | + protected array $productFields = [] |
30 | 30 | ) { |
31 | | - parent::__construct($product, $numberFormatter, $stockItem, $productFields); |
| 31 | + parent::__construct($product, $numberFormatter, $getSourceItemsBySku, $productFields); |
32 | 32 | } |
33 | 33 |
|
34 | 34 | public function getEntities(): iterable |
|
0 commit comments