calculator = $calculator; } /** * Get Selection pricing list. * * @param ConfiguredPriceInterface $price * @return array */ public function getSelectionPriceList(ConfiguredPriceInterface $price): array { $selectionPriceList = []; foreach ($price->getOptions() as $option) { $selectionPriceList = array_merge( $selectionPriceList, $this->createSelectionPriceList($option, $price->getProduct()) ); } return $selectionPriceList; } /** * Create Selection Price List. * * @param ExtensibleDataInterface $option * @param Product $product * @return array */ private function createSelectionPriceList(ExtensibleDataInterface $option, Product $product): array { return $this->calculator->createSelectionPriceList($option, $product); } }