PHP Class Sonata\Component\Basket\Basket

Author: Thomas Rabaix ([email protected])
Inheritance: implements Serializable, implements Sonata\Component\Basket\BasketInterface
Afficher le fichier Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Свойство Type Description
$basketElements array
$billingAddress Sonata\Component\Customer\AddressInterface
$billingAddressId integer
$cptElement integer
$currency Sonata\Component\Currency\CurrencyInterface
$customer Sonata\Component\Customer\CustomerInterface
$customerId integer
$deliveryAddress Sonata\Component\Customer\AddressInterface
$deliveryAddressId integer
$deliveryMethod Sonata\Component\Delivery\ServiceDeliveryInterface
$deliveryMethodCode string
$inBuild boolean
$locale string
$options array
$paymentMethod Sonata\Component\Payment\PaymentInterface
$paymentMethodCode string
$positions array
$productPool Sonata\Component\Product\Pool

Méthodes publiques

Méthode Description
__construct ( )
addBasketElement ( Sonata\Component\Basket\BasketElementInterface $basketElement )
buildPrices ( )
clean ( )
countBasketElements ( )
getBasketElements ( )
getBillingAddress ( )
getBillingAddressId ( )
getCurrency ( )
getCustomer ( )
getCustomerId ( )
getDeliveryAddress ( )
getDeliveryAddressId ( )
getDeliveryMethod ( )
getDeliveryMethodCode ( )
getDeliveryPrice ( $vat = false )
getDeliveryVat ( )
getElement ( Sonata\Component\Product\ProductInterface $product )
getElementByPos ( $pos )
getLocale ( )
getOption ( $name, $default = null )
getOptions ( )
getPaymentMethod ( )
getPaymentMethodCode ( )
getPositions ( )
getProductPool ( )
getSerializationFields ( )
getTotal ( $vat = false, $recurrentOnly = null )
getUnserializationFields ( )
getVatAmount ( )
getVatAmounts ( )
hasBasketElements ( )
hasProduct ( Sonata\Component\Product\ProductInterface $product )
hasRecurrentPayment ( )
isAddable ( Sonata\Component\Product\ProductInterface $product )
isEmpty ( )
isValid ( $elementsOnly = false )
removeBasketElement ( Sonata\Component\Basket\BasketElementInterface $element )
removeElement ( Sonata\Component\Basket\BasketElementInterface $element )
removeElements ( array $elementsToRemove )
reset ( $full = true )
serialize ( )
setBasketElements ( $basketElements )
setBillingAddress ( Sonata\Component\Customer\AddressInterface $address = null )
setBillingAddressId ( $billingAddressId )
setCurrency ( Sonata\Component\Currency\CurrencyInterface $currency )
setCustomer ( Sonata\Component\Customer\CustomerInterface $customer = null )
setCustomerId ( $customerId )
setDeliveryAddress ( Sonata\Component\Customer\AddressInterface $address = null )
setDeliveryAddressId ( $deliveryAddressId )
setDeliveryMethod ( Sonata\Component\Delivery\ServiceDeliveryInterface $method = null )
setDeliveryMethodCode ( $deliveryMethodCode )
setLocale ( $locale )
setOption ( $name, $value )
setOptions ( $options )
setPaymentMethod ( Sonata\Component\Payment\PaymentInterface $method = null )
setPaymentMethodCode ( $paymentMethodCode )
setProductPool ( Pool $pool )
unserialize ( $data )

Method Details

__construct() public méthode

public __construct ( )

addBasketElement() public méthode

public addBasketElement ( Sonata\Component\Basket\BasketElementInterface $basketElement )
$basketElement Sonata\Component\Basket\BasketElementInterface

buildPrices() public méthode

public buildPrices ( )

clean() public méthode

public clean ( )

countBasketElements() public méthode

public countBasketElements ( )

getBasketElements() public méthode

public getBasketElements ( )

getBillingAddress() public méthode

public getBillingAddress ( )

getBillingAddressId() public méthode

public getBillingAddressId ( )

getCurrency() public méthode

public getCurrency ( )

getCustomer() public méthode

public getCustomer ( )

getCustomerId() public méthode

public getCustomerId ( )

getDeliveryAddress() public méthode

public getDeliveryAddress ( )

getDeliveryAddressId() public méthode

getDeliveryMethod() public méthode

public getDeliveryMethod ( )

getDeliveryMethodCode() public méthode

getDeliveryPrice() public méthode

public getDeliveryPrice ( $vat = false )

getDeliveryVat() public méthode

public getDeliveryVat ( )

getElement() public méthode

public getElement ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

getElementByPos() public méthode

public getElementByPos ( $pos )

getLocale() public méthode

public getLocale ( )

getOption() public méthode

public getOption ( $name, $default = null )

getOptions() public méthode

public getOptions ( )

getPaymentMethod() public méthode

public getPaymentMethod ( )

getPaymentMethodCode() public méthode

getPositions() public méthode

public getPositions ( )

getProductPool() public méthode

public getProductPool ( )

getSerializationFields() public méthode

getTotal() public méthode

public getTotal ( $vat = false, $recurrentOnly = null )

getUnserializationFields() public méthode

getVatAmount() public méthode

public getVatAmount ( )

getVatAmounts() public méthode

public getVatAmounts ( )

hasBasketElements() public méthode

public hasBasketElements ( )

hasProduct() public méthode

public hasProduct ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

hasRecurrentPayment() public méthode

public hasRecurrentPayment ( )

isAddable() public méthode

public isAddable ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

isEmpty() public méthode

public isEmpty ( )

isValid() public méthode

public isValid ( $elementsOnly = false )

removeBasketElement() public méthode

public removeBasketElement ( Sonata\Component\Basket\BasketElementInterface $element )
$element Sonata\Component\Basket\BasketElementInterface

removeElement() public méthode

public removeElement ( Sonata\Component\Basket\BasketElementInterface $element )
$element Sonata\Component\Basket\BasketElementInterface

removeElements() public méthode

public removeElements ( array $elementsToRemove )
$elementsToRemove array

reset() public méthode

public reset ( $full = true )

serialize() public méthode

public serialize ( )

setBasketElements() public méthode

public setBasketElements ( $basketElements )

setBillingAddress() public méthode

public setBillingAddress ( Sonata\Component\Customer\AddressInterface $address = null )
$address Sonata\Component\Customer\AddressInterface

setBillingAddressId() public méthode

public setBillingAddressId ( $billingAddressId )

setCurrency() public méthode

public setCurrency ( Sonata\Component\Currency\CurrencyInterface $currency )
$currency Sonata\Component\Currency\CurrencyInterface

setCustomer() public méthode

public setCustomer ( Sonata\Component\Customer\CustomerInterface $customer = null )
$customer Sonata\Component\Customer\CustomerInterface

setCustomerId() public méthode

public setCustomerId ( $customerId )

setDeliveryAddress() public méthode

public setDeliveryAddress ( Sonata\Component\Customer\AddressInterface $address = null )
$address Sonata\Component\Customer\AddressInterface

setDeliveryAddressId() public méthode

public setDeliveryAddressId ( $deliveryAddressId )

setDeliveryMethod() public méthode

public setDeliveryMethod ( Sonata\Component\Delivery\ServiceDeliveryInterface $method = null )
$method Sonata\Component\Delivery\ServiceDeliveryInterface

setDeliveryMethodCode() public méthode

public setDeliveryMethodCode ( $deliveryMethodCode )

setLocale() public méthode

public setLocale ( $locale )

setOption() public méthode

public setOption ( $name, $value )

setOptions() public méthode

public setOptions ( $options )

setPaymentMethod() public méthode

public setPaymentMethod ( Sonata\Component\Payment\PaymentInterface $method = null )
$method Sonata\Component\Payment\PaymentInterface

setPaymentMethodCode() public méthode

public setPaymentMethodCode ( $paymentMethodCode )

setProductPool() public méthode

public setProductPool ( Pool $pool )
$pool Sonata\Component\Product\Pool

unserialize() public méthode

public unserialize ( $data )

Property Details

$basketElements protected_oe property

protected array $basketElements
Résultat array

$billingAddress protected_oe property

protected AddressInterface,Sonata\Component\Customer $billingAddress
Résultat Sonata\Component\Customer\AddressInterface

$billingAddressId protected_oe property

protected int $billingAddressId
Résultat integer

$cptElement protected_oe property

protected int $cptElement
Résultat integer

$currency protected_oe property

protected CurrencyInterface,Sonata\Component\Currency $currency
Résultat Sonata\Component\Currency\CurrencyInterface

$customer protected_oe property

protected CustomerInterface,Sonata\Component\Customer $customer
Résultat Sonata\Component\Customer\CustomerInterface

$customerId protected_oe property

protected int $customerId
Résultat integer

$deliveryAddress protected_oe property

protected AddressInterface,Sonata\Component\Customer $deliveryAddress
Résultat Sonata\Component\Customer\AddressInterface

$deliveryAddressId protected_oe property

protected int $deliveryAddressId
Résultat integer

$deliveryMethod protected_oe property

protected ServiceDeliveryInterface,Sonata\Component\Delivery $deliveryMethod
Résultat Sonata\Component\Delivery\ServiceDeliveryInterface

$deliveryMethodCode protected_oe property

protected string $deliveryMethodCode
Résultat string

$inBuild protected_oe property

protected bool $inBuild
Résultat boolean

$locale protected_oe property

protected string $locale
Résultat string

$options protected_oe property

protected array $options
Résultat array

$paymentMethod protected_oe property

protected PaymentInterface,Sonata\Component\Payment $paymentMethod
Résultat Sonata\Component\Payment\PaymentInterface

$paymentMethodCode protected_oe property

protected string $paymentMethodCode
Résultat string

$positions protected_oe property

protected array $positions
Résultat array

$productPool protected_oe property

protected Pool,Sonata\Component\Product $productPool
Résultat Sonata\Component\Product\Pool