PHP Class Sonata\Component\Basket\BasketElement

Inheritance: implements Serializable, implements Sonata\Component\Basket\BasketElementInterface
Show file Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$delete * used by the validation framework
$name string
$options array
$position integer
$price float
$priceIncludingVat boolean
$product Sonata\Component\Product\ProductInterface
$productCode string
$productDefinition Sonata\Component\Product\ProductDefinition
$productId integer
$quantity integer
$unitPrice float
$vatRate float

Public Methods

Method Description
getDelete ( )
getName ( )
getOption ( $name, $default = null )
getOptions ( )
getPosition ( )
getPrice ( $vat = false )
getProduct ( )
getProductCode ( )
getProductDefinition ( )
getProductId ( )
getProductManager ( )
getProductProvider ( )
getQuantity ( )
getTotal ( $vat = false )
getUnitPrice ( $vat = false )
getVatAmount ( )
getVatRate ( )
hasOption ( $name )
hasProductDefinition ( )
isPriceIncludingVat ( )
isValid ( )
serialize ( )
setDelete ( $delete )
setOption ( $name, $value )
setOptions ( array $options = [] )
setPosition ( $position )
setPrice ( $price )
setPriceIncludingVat ( $priceIncludingVat )
setProduct ( $productCode, Sonata\Component\Product\ProductInterface $product )
setProductDefinition ( ProductDefinition $productDefinition )
setProductId ( $productId )
setQuantity ( $quantity )
setUnitPrice ( $unitPrice )
setVatRate ( $vatRate )
unserialize ( $data )

Method Details

getDelete() public method

public getDelete ( )

getName() public method

public getName ( )

getOption() public method

public getOption ( $name, $default = null )

getOptions() public method

public getOptions ( )

getPosition() public method

public getPosition ( )

getPrice() public method

public getPrice ( $vat = false )

getProduct() public method

public getProduct ( )

getProductCode() public method

public getProductCode ( )

getProductDefinition() public method

getProductId() public method

public getProductId ( )

getProductManager() public method

public getProductManager ( )

getProductProvider() public method

public getProductProvider ( )

getQuantity() public method

public getQuantity ( )

getTotal() public method

public getTotal ( $vat = false )

getUnitPrice() public method

public getUnitPrice ( $vat = false )

getVatAmount() public method

public getVatAmount ( )

getVatRate() public method

public getVatRate ( )

hasOption() public method

public hasOption ( $name )

hasProductDefinition() public method

isPriceIncludingVat() public method

public isPriceIncludingVat ( )

isValid() public method

public isValid ( )

serialize() public method

public serialize ( )

setDelete() public method

public setDelete ( $delete )

setOption() public method

public setOption ( $name, $value )

setOptions() public method

public setOptions ( array $options = [] )
$options array

setPosition() public method

public setPosition ( $position )

setPrice() public method

public setPrice ( $price )

setPriceIncludingVat() public method

public setPriceIncludingVat ( $priceIncludingVat )

setProduct() public method

public setProduct ( $productCode, Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

setProductDefinition() public method

public setProductDefinition ( ProductDefinition $productDefinition )
$productDefinition Sonata\Component\Product\ProductDefinition

setProductId() public method

public setProductId ( $productId )

setQuantity() public method

public setQuantity ( $quantity )

setUnitPrice() public method

public setUnitPrice ( $unitPrice )

setVatRate() public method

public setVatRate ( $vatRate )

unserialize() public method

public unserialize ( $data )

Property Details

$delete protected property

* used by the validation framework
protected $delete

$name protected property

protected string $name
return string

$options protected property

protected array $options
return array

$position protected property

protected int $position
return integer

$price protected property

protected float $price
return float

$priceIncludingVat protected property

protected bool $priceIncludingVat
return boolean

$product protected property

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

$productCode protected property

protected string $productCode
return string

$productDefinition protected property

protected ProductDefinition,Sonata\Component\Product $productDefinition
return Sonata\Component\Product\ProductDefinition

$productId protected property

protected int $productId
return integer

$quantity protected property

protected int $quantity
return integer

$unitPrice protected property

protected float $unitPrice
return float

$vatRate protected property

protected float $vatRate
return float