PHP Class Sonata\Component\Event\BeforeCalculatePriceEvent

Author: Hugo Briand ([email protected])
Inheritance: extends Symfony\Component\EventDispatcher\Event
Show file Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$currency Sonata\Component\Currency\CurrencyInterface
$product Sonata\Component\Product\ProductInterface
$quantity integer
$vat boolean

Public Methods

Method Description
__construct ( Sonata\Component\Product\ProductInterface $product, Sonata\Component\Currency\CurrencyInterface $currency, boolean $vat, integer $quantity )
getCurrency ( ) : Sonata\Component\Currency\CurrencyInterface
getProduct ( ) : Sonata\Component\Product\ProductInterface
getQuantity ( ) : integer
getVat ( ) : boolean
setQuantity ( integer $quantity )
setVat ( boolean $vat )

Method Details

__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

getCurrency() public method

public getCurrency ( ) : Sonata\Component\Currency\CurrencyInterface
return Sonata\Component\Currency\CurrencyInterface

getProduct() public method

public getProduct ( ) : Sonata\Component\Product\ProductInterface
return Sonata\Component\Product\ProductInterface

getQuantity() public method

public getQuantity ( ) : integer
return integer

getVat() public method

public getVat ( ) : boolean
return boolean

setQuantity() public method

public setQuantity ( integer $quantity )
$quantity integer

setVat() public method

public setVat ( boolean $vat )
$vat boolean

Property Details

$currency protected property

protected CurrencyInterface,Sonata\Component\Currency $currency
return Sonata\Component\Currency\CurrencyInterface

$product protected property

protected ProductInterface,Sonata\Component\Product $product
return Sonata\Component\Product\ProductInterface

$quantity protected property

protected int $quantity
return integer

$vat protected property

protected bool $vat
return boolean