Sonata\Component\Product\ProductProviderInterface::calculatePrice PHP Method

calculatePrice() public method

Calculate the product price depending on the currency.
public calculatePrice ( Sonata\Component\Product\ProductInterface $product, Sonata\Component\Currency\CurrencyInterface $currency, boolean $vat = false, integer $quantity = 1 ) : float
$product Sonata\Component\Product\ProductInterface A product instance
$currency Sonata\Component\Currency\CurrencyInterface A currency instance
$vat boolean Returns price including VAT?
$quantity integer Defaults to one
return float
    public function calculatePrice(ProductInterface $product, CurrencyInterface $currency, $vat = false, $quantity = 1);