PHP 인터페이스 Sonata\Component\Basket\BasketElementInterface

상속: extends Sonata\Component\Product\PriceComputableInterface
파일 보기 프로젝트 열기: sonata-project/ecommerce 0 사용 예제들

공개 메소드들

메소드 설명
getDelete ( ) : boolean
getName ( ) : string return the name of the basket element.
getOption ( string $name, mixed $default = null ) : mixed return a option value depends on the $name.
getOptions ( ) : array return the basket element options array.
getPosition ( ) : integer return the pos of the current basket element.
getProduct ( ) : Sonata\Component\Product\ProductInterface Return the related product.
getProductCode ( ) : string
getProductId ( ) : integer return the product id.
getProductManager ( ) : Sonata\Component\Product\ProductManagerInterface
getProductProvider ( ) : Sonata\Component\Product\ProductProviderInterface
getTotal ( boolean $vat = false ) : float Return the total (price * quantity).
getVatAmount ( ) Returns the VAT amount.
isPriceIncludingVat ( ) : boolean Returns if price is including VAT.
isValid ( ) : boolean Check if the basket element is still valid.
setDelete ( boolean $delete )
setOption ( string $name, mixed $value ) Define the option value.
setPosition ( integer $position ) the position in the basket stack.
setPriceIncludingVat ( float $priceIncludingVat ) Sets if current price is including VAT.
setProduct ( string $productCode, Sonata\Component\Product\ProductInterface $product ) Define the related product.
setProductDefinition ( ProductDefinition $productDefinition )
setProductId ( integer $productId ) Never call this method, use the setProduct instead. This method is only used by the form framework.
setUnitPrice ( float $unitPrice ) Sets product unit price.

메소드 상세

getDelete() 공개 메소드

public getDelete ( ) : boolean
리턴 boolean

getName() 공개 메소드

return the name of the basket element.
public getName ( ) : string
리턴 string

getOption() 공개 메소드

return a option value depends on the $name.
public getOption ( string $name, mixed $default = null ) : mixed
$name string
$default mixed Default value if option not found
리턴 mixed

getOptions() 공개 메소드

return the basket element options array.
public getOptions ( ) : array
리턴 array

getPosition() 공개 메소드

return the pos of the current basket element.
public getPosition ( ) : integer
리턴 integer

getProduct() 공개 메소드

Return the related product.
public getProduct ( ) : Sonata\Component\Product\ProductInterface
리턴 Sonata\Component\Product\ProductInterface

getProductCode() 공개 메소드

public getProductCode ( ) : string
리턴 string

getProductId() 공개 메소드

return the product id.
public getProductId ( ) : integer
리턴 integer

getProductManager() 공개 메소드

public getProductManager ( ) : Sonata\Component\Product\ProductManagerInterface
리턴 Sonata\Component\Product\ProductManagerInterface

getProductProvider() 공개 메소드

public getProductProvider ( ) : Sonata\Component\Product\ProductProviderInterface
리턴 Sonata\Component\Product\ProductProviderInterface

getTotal() 공개 메소드

if $vat = true, return the price with vat
public getTotal ( boolean $vat = false ) : float
$vat boolean Returns price including VAT?
리턴 float

getVatAmount() 공개 메소드

Returns the VAT amount.
public getVatAmount ( )

isPriceIncludingVat() 공개 메소드

Returns if price is including VAT.
public isPriceIncludingVat ( ) : boolean
리턴 boolean

isValid() 공개 메소드

Check if the basket element is still valid.
public isValid ( ) : boolean
리턴 boolean

setDelete() 공개 메소드

public setDelete ( boolean $delete )
$delete boolean

setOption() 공개 메소드

Define the option value.
public setOption ( string $name, mixed $value )
$name string
$value mixed

setPosition() 공개 메소드

the position in the basket stack.
public setPosition ( integer $position )
$position integer

setPriceIncludingVat() 공개 메소드

Sets if current price is including VAT.
public setPriceIncludingVat ( float $priceIncludingVat )
$priceIncludingVat float

setProduct() 공개 메소드

Define the related product.
public setProduct ( string $productCode, Sonata\Component\Product\ProductInterface $product )
$productCode string
$product Sonata\Component\Product\ProductInterface

setProductDefinition() 공개 메소드

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

setProductId() 공개 메소드

Never call this method, use the setProduct instead. This method is only used by the form framework.
public setProductId ( integer $productId )
$productId integer

setUnitPrice() 공개 메소드

Sets product unit price.
public setUnitPrice ( float $unitPrice )
$unitPrice float