public getPrice ( Sonata\Component\Product\ProductInterface $product, Sonata\Component\Currency\CurrencyInterface $currency, boolean $vat = false ) : float | ||
$product | Sonata\Component\Product\ProductInterface | A product instance |
$currency | Sonata\Component\Currency\CurrencyInterface | A currency instance |
$vat | boolean | Return price including VAT? |
Результат | float |
public function getPrice(ProductInterface $product, CurrencyInterface $currency, $vat = false);
/** * {@inheritdoc} */ public function calculatePrice(ProductInterface $product, CurrencyInterface $currency, $vat = false, $quantity = 1) { if (!is_int($quantity) || $quantity < 1) { throw new InvalidParameterException("Expected integer >= 1 for quantity, " . $quantity . " given."); } return floatval(bcmul($this->currencyPriceCalculator->getPrice($product, $currency, $vat), $quantity)); }