PHP Класс Sonata\Component\Basket\Basket

Автор: Thomas Rabaix ([email protected])
Наследование: implements Serializable, implements Sonata\Component\Basket\BasketInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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 )

Описание методов

__construct() публичный Метод

public __construct ( )

addBasketElement() публичный Метод

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

buildPrices() публичный Метод

public buildPrices ( )

clean() публичный Метод

public clean ( )

countBasketElements() публичный Метод

public countBasketElements ( )

getBasketElements() публичный Метод

public getBasketElements ( )

getBillingAddress() публичный Метод

public getBillingAddress ( )

getBillingAddressId() публичный Метод

public getBillingAddressId ( )

getCurrency() публичный Метод

public getCurrency ( )

getCustomer() публичный Метод

public getCustomer ( )

getCustomerId() публичный Метод

public getCustomerId ( )

getDeliveryAddress() публичный Метод

public getDeliveryAddress ( )

getDeliveryAddressId() публичный Метод

getDeliveryMethod() публичный Метод

public getDeliveryMethod ( )

getDeliveryMethodCode() публичный Метод

getDeliveryPrice() публичный Метод

public getDeliveryPrice ( $vat = false )

getDeliveryVat() публичный Метод

public getDeliveryVat ( )

getElement() публичный Метод

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

getElementByPos() публичный Метод

public getElementByPos ( $pos )

getLocale() публичный Метод

public getLocale ( )

getOption() публичный Метод

public getOption ( $name, $default = null )

getOptions() публичный Метод

public getOptions ( )

getPaymentMethod() публичный Метод

public getPaymentMethod ( )

getPaymentMethodCode() публичный Метод

getPositions() публичный Метод

public getPositions ( )

getProductPool() публичный Метод

public getProductPool ( )

getSerializationFields() публичный Метод

getTotal() публичный Метод

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

getUnserializationFields() публичный Метод

getVatAmount() публичный Метод

public getVatAmount ( )

getVatAmounts() публичный Метод

public getVatAmounts ( )

hasBasketElements() публичный Метод

public hasBasketElements ( )

hasProduct() публичный Метод

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

hasRecurrentPayment() публичный Метод

public hasRecurrentPayment ( )

isAddable() публичный Метод

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

isEmpty() публичный Метод

public isEmpty ( )

isValid() публичный Метод

public isValid ( $elementsOnly = false )

removeBasketElement() публичный Метод

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

removeElement() публичный Метод

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

removeElements() публичный Метод

public removeElements ( array $elementsToRemove )
$elementsToRemove array

reset() публичный Метод

public reset ( $full = true )

serialize() публичный Метод

public serialize ( )

setBasketElements() публичный Метод

public setBasketElements ( $basketElements )

setBillingAddress() публичный Метод

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

setBillingAddressId() публичный Метод

public setBillingAddressId ( $billingAddressId )

setCurrency() публичный Метод

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

setCustomer() публичный Метод

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

setCustomerId() публичный Метод

public setCustomerId ( $customerId )

setDeliveryAddress() публичный Метод

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

setDeliveryAddressId() публичный Метод

public setDeliveryAddressId ( $deliveryAddressId )

setDeliveryMethod() публичный Метод

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

setDeliveryMethodCode() публичный Метод

public setDeliveryMethodCode ( $deliveryMethodCode )

setLocale() публичный Метод

public setLocale ( $locale )

setOption() публичный Метод

public setOption ( $name, $value )

setOptions() публичный Метод

public setOptions ( $options )

setPaymentMethod() публичный Метод

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

setPaymentMethodCode() публичный Метод

public setPaymentMethodCode ( $paymentMethodCode )

setProductPool() публичный Метод

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

unserialize() публичный Метод

public unserialize ( $data )

Описание свойств

$basketElements защищенное свойство

protected array $basketElements
Результат array

$billingAddress защищенное свойство

protected AddressInterface,Sonata\Component\Customer $billingAddress
Результат Sonata\Component\Customer\AddressInterface

$billingAddressId защищенное свойство

protected int $billingAddressId
Результат integer

$cptElement защищенное свойство

protected int $cptElement
Результат integer

$currency защищенное свойство

protected CurrencyInterface,Sonata\Component\Currency $currency
Результат Sonata\Component\Currency\CurrencyInterface

$customer защищенное свойство

protected CustomerInterface,Sonata\Component\Customer $customer
Результат Sonata\Component\Customer\CustomerInterface

$customerId защищенное свойство

protected int $customerId
Результат integer

$deliveryAddress защищенное свойство

protected AddressInterface,Sonata\Component\Customer $deliveryAddress
Результат Sonata\Component\Customer\AddressInterface

$deliveryAddressId защищенное свойство

protected int $deliveryAddressId
Результат integer

$deliveryMethod защищенное свойство

protected ServiceDeliveryInterface,Sonata\Component\Delivery $deliveryMethod
Результат Sonata\Component\Delivery\ServiceDeliveryInterface

$deliveryMethodCode защищенное свойство

protected string $deliveryMethodCode
Результат string

$inBuild защищенное свойство

protected bool $inBuild
Результат boolean

$locale защищенное свойство

protected string $locale
Результат string

$options защищенное свойство

protected array $options
Результат array

$paymentMethod защищенное свойство

protected PaymentInterface,Sonata\Component\Payment $paymentMethod
Результат Sonata\Component\Payment\PaymentInterface

$paymentMethodCode защищенное свойство

protected string $paymentMethodCode
Результат string

$positions защищенное свойство

protected array $positions
Результат array

$productPool защищенное свойство

protected Pool,Sonata\Component\Product $productPool
Результат Sonata\Component\Product\Pool