Sonata\Component\Event\BeforeCalculatePriceEvent::__construct PHP Method

__construct() public method

public __construct ( Sonata\Component\Product\ProductInterface $product, Sonata\Component\Currency\CurrencyInterface $currency, boolean $vat, integer $quantity )
$product Sonata\Component\Product\ProductInterface
$currency Sonata\Component\Currency\CurrencyInterface
$vat boolean
$quantity integer
    public function __construct(ProductInterface $product, CurrencyInterface $currency, $vat, $quantity)
    {
        $this->product = $product;
        $this->currency = $currency;
        $this->vat = $vat;
        $this->quantity = $quantity;
    }

Usage Example

 /**
  * @param ProductInterface  $product
  * @param CurrencyInterface $currency
  * @param bool              $vat
  * @param int               $quantity
  * @param float             $price
  */
 public function __construct(ProductInterface $product, CurrencyInterface $currency, $vat, $quantity, $price)
 {
     parent::__construct($product, $currency, $vat, $quantity);
     $this->price = $price;
 }