11 use Magento\Catalog\Api\Data\ProductRender\PriceInfoInterfaceFactory;
33 private $priceCurrency;
38 private $excludeAdjustments;
43 private $priceInfoFactory;
48 private $formattedPriceInfoBuilder;
59 PriceInfoInterfaceFactory $priceInfoFactory,
61 array $excludeAdjustments = []
63 $this->priceCurrency = $priceCurrency;
64 $this->excludeAdjustments = $excludeAdjustments;
65 $this->priceInfoFactory = $priceInfoFactory;
66 $this->formattedPriceInfoBuilder = $formattedPriceInfoBuilder;
79 $priceInfo = $this->priceInfoFactory->create();
82 $priceInfo->setMaxPrice(
85 ->getPrice(
'final_price')
90 $priceInfo->setMaxRegularPrice(
93 ->getPrice(
'regular_price')
98 $priceInfo->setMinimalPrice(
101 ->getPrice(
'final_price')
106 $priceInfo->setMinimalRegularPrice(
109 ->getPrice(
'regular_price')
113 $this->formattedPriceInfoBuilder->build(
setPriceInfo(PriceInfoInterface $priceInfo)
__construct(PriceCurrencyInterface $priceCurrency, PriceInfoInterfaceFactory $priceInfoFactory, FormattedPriceInfoBuilder $formattedPriceInfoBuilder, array $excludeAdjustments=[])
collect(ProductInterface $product, ProductRenderInterface $productRender)