PHP Class Sonata\OrderBundle\Entity\BaseOrderElement

Inheritance: implements Sonata\Component\Order\OrderElementInterface
Afficher le fichier Open project: sonata-project/ecommerce

Protected Properties

Свойство Type Description
$createdAt
$deliveryStatus integer
$description string
$designation string
$options array
$order integer
$price float
$product Sonata\Component\Product\ProductInterface
$productId integer
$productType string
$quantity integer
$rawProduct array
$status integer
$unitPriceExcl float
$unitPriceInc float
$updatedAt
$validatedAt DateTime
$vatRate float

Méthodes publiques

Méthode Description
__construct ( )
__toString ( ) : string
getCreatedAt ( ) : DateTime
getDeliveryStatus ( ) : integer Get delivery_status.
getDeliveryStatusList ( ) : array
getDeliveryStatusName ( ) : string
getDescription ( ) : string Get description.
getDesignation ( ) : string Get designation.
getOption ( string $name, mixed $default = null ) : mixed
getOptions ( ) : array
getOrder ( ) : Order Get order.
getPrice ( $vat = false )
getProduct ( ) : Sonata\Component\Product\ProductInterface Get product.
getProductId ( ) : integer Get productId.
getProductType ( ) : string Get product_type.
getQuantity ( )
getRawProduct ( ) : array
getRawProductValue ( string $name, string $default = null ) : mixed
getStatus ( ) : integer Get status.
getStatusList ( ) : array
getStatusName ( ) : string
getTotal ( boolean $vat = false ) : float Return the total (price * quantity).
getTotalWithVat ( ) : float Returns the total with vat due to limitation of AdminBundle.
getUnitPrice ( $vat = false )
getUnitPriceExcl ( ) : float Returns unit price including VAT.
getUnitPriceInc ( ) : float Returns unit price including VAT.
getUpdatedAt ( ) : DateTime
getValidatedAt ( ) : DateTime Get validated_at.
getVatAmount ( ) : float Returns VAT element amount.
getVatRate ( )
hasOption ( string $name ) : boolean
isCancellable ( ) : boolean
isCancelled ( ) : boolean
isError ( ) : boolean Return true if the order has an error.
isOpen ( ) : boolean Return true if the order is open.
isPending ( ) : boolean
isValidated ( ) : boolean return true if the order is validated.
prePersist ( )
preUpdate ( )
setCreatedAt ( DateTime $createdAt = null )
setDeliveryStatus ( integer $deliveryStatus ) Set delivery_status.
setDescription ( string $description ) Set description.
setDesignation ( string $designation ) Set designation.
setOption ( string $name, mixed $value )
setOptions ( array $options )
setOrder ( Sonata\Component\Order\OrderInterface $order ) Set order.
setPrice ( $price )
setProduct ( Sonata\Component\Product\ProductInterface $product ) Add product.
setProductId ( integer $productId ) Set productId.
setProductType ( string $productType ) Set product_type.
setQuantity ( $quantity )
setRawProduct ( array $rawProduct )
setStatus ( integer $status ) Set status.
setUnitPriceExcl ( float $unitPriceExcl ) Sets unit price excluding VAT.
setUnitPriceInc ( float $unitPriceInc ) Sets unit price including VAT.
setUpdatedAt ( DateTime $updatedAt = null )
setValidatedAt ( DateTime $validatedAt = null ) Set validated_at.
setVatRate ( $vatRate )

Method Details

__construct() public méthode

public __construct ( )

__toString() public méthode

public __toString ( ) : string
Résultat string

getCreatedAt() public méthode

public getCreatedAt ( ) : DateTime
Résultat DateTime

getDeliveryStatus() public méthode

Get delivery_status.
public getDeliveryStatus ( ) : integer
Résultat integer $deliveryStatus

getDeliveryStatusList() public static méthode

public static getDeliveryStatusList ( ) : array
Résultat array

getDeliveryStatusName() public méthode

public getDeliveryStatusName ( ) : string
Résultat string

getDescription() public méthode

Get description.
public getDescription ( ) : string
Résultat string $description

getDesignation() public méthode

Get designation.
public getDesignation ( ) : string
Résultat string $designation

getOption() public méthode

public getOption ( string $name, mixed $default = null ) : mixed
$name string
$default mixed
Résultat mixed

getOptions() public méthode

public getOptions ( ) : array
Résultat array

getOrder() public méthode

Get order.
public getOrder ( ) : Order
Résultat Order $order

getPrice() public méthode

public getPrice ( $vat = false )

getProduct() public méthode

Get product.
public getProduct ( ) : Sonata\Component\Product\ProductInterface
Résultat Sonata\Component\Product\ProductInterface $product

getProductId() public méthode

Get productId.
public getProductId ( ) : integer
Résultat integer $productId

getProductType() public méthode

Get product_type.
public getProductType ( ) : string
Résultat string $productType

getQuantity() public méthode

public getQuantity ( )

getRawProduct() public méthode

public getRawProduct ( ) : array
Résultat array

getRawProductValue() public méthode

public getRawProductValue ( string $name, string $default = null ) : mixed
$name string
$default string
Résultat mixed

getStatus() public méthode

Get status.
public getStatus ( ) : integer
Résultat integer $status

getStatusList() public static méthode

public static getStatusList ( ) : array
Résultat array

getStatusName() public méthode

public getStatusName ( ) : string
Résultat string

getTotal() public méthode

if $vat = true, return the price with vat
public getTotal ( boolean $vat = false ) : float
$vat boolean
Résultat float

getTotalWithVat() public méthode

Returns the total with vat due to limitation of AdminBundle.
public getTotalWithVat ( ) : float
Résultat float

getUnitPrice() public méthode

public getUnitPrice ( $vat = false )

getUnitPriceExcl() public méthode

Returns unit price including VAT.
public getUnitPriceExcl ( ) : float
Résultat float

getUnitPriceInc() public méthode

Returns unit price including VAT.
public getUnitPriceInc ( ) : float
Résultat float

getUpdatedAt() public méthode

public getUpdatedAt ( ) : DateTime
Résultat DateTime

getValidatedAt() public méthode

Get validated_at.
public getValidatedAt ( ) : DateTime
Résultat DateTime $validatedAt

getVatAmount() public méthode

Returns VAT element amount.
public getVatAmount ( ) : float
Résultat float

getVatRate() public méthode

public getVatRate ( )

hasOption() public méthode

public hasOption ( string $name ) : boolean
$name string
Résultat boolean

isCancellable() public méthode

public isCancellable ( ) : boolean
Résultat boolean

isCancelled() public méthode

public isCancelled ( ) : boolean
Résultat boolean true if cancelled, else false

isError() public méthode

Return true if the order has an error.
public isError ( ) : boolean
Résultat boolean

isOpen() public méthode

Return true if the order is open.
public isOpen ( ) : boolean
Résultat boolean

isPending() public méthode

public isPending ( ) : boolean
Résultat boolean true if pending, else false

isValidated() public méthode

return true if the order is validated.
public isValidated ( ) : boolean
Résultat boolean

prePersist() public méthode

public prePersist ( )

preUpdate() public méthode

public preUpdate ( )

setCreatedAt() public méthode

public setCreatedAt ( DateTime $createdAt = null )
$createdAt DateTime

setDeliveryStatus() public méthode

Set delivery_status.
public setDeliveryStatus ( integer $deliveryStatus )
$deliveryStatus integer

setDescription() public méthode

Set description.
public setDescription ( string $description )
$description string

setDesignation() public méthode

Set designation.
public setDesignation ( string $designation )
$designation string

setOption() public méthode

public setOption ( string $name, mixed $value )
$name string
$value mixed

setOptions() public méthode

public setOptions ( array $options )
$options array

setOrder() public méthode

Set order.
public setOrder ( Sonata\Component\Order\OrderInterface $order )
$order Sonata\Component\Order\OrderInterface

setPrice() public méthode

public setPrice ( $price )

setProduct() public méthode

Add product.
public setProduct ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

setProductId() public méthode

Set productId.
public setProductId ( integer $productId )
$productId integer

setProductType() public méthode

Set product_type.
public setProductType ( string $productType )
$productType string

setQuantity() public méthode

public setQuantity ( $quantity )

setRawProduct() public méthode

public setRawProduct ( array $rawProduct )
$rawProduct array

setStatus() public méthode

Set status.
public setStatus ( integer $status )
$status integer

setUnitPriceExcl() public méthode

Sets unit price excluding VAT.
public setUnitPriceExcl ( float $unitPriceExcl )
$unitPriceExcl float

setUnitPriceInc() public méthode

Sets unit price including VAT.
public setUnitPriceInc ( float $unitPriceInc )
$unitPriceInc float

setUpdatedAt() public méthode

public setUpdatedAt ( DateTime $updatedAt = null )
$updatedAt DateTime

setValidatedAt() public méthode

Set validated_at.
public setValidatedAt ( DateTime $validatedAt = null )
$validatedAt DateTime

setVatRate() public méthode

public setVatRate ( $vatRate )

Property Details

$createdAt protected_oe property

protected $createdAt

$deliveryStatus protected_oe property

protected int $deliveryStatus
Résultat integer

$description protected_oe property

protected string $description
Résultat string

$designation protected_oe property

protected string $designation
Résultat string

$options protected_oe property

protected array $options
Résultat array

$order protected_oe property

protected int $order
Résultat integer

$price protected_oe property

protected float $price
Résultat float

$product protected_oe property

protected ProductInterface,Sonata\Component\Product $product
Résultat Sonata\Component\Product\ProductInterface

$productId protected_oe property

protected int $productId
Résultat integer

$productType protected_oe property

protected string $productType
Résultat string

$quantity protected_oe property

protected int $quantity
Résultat integer

$rawProduct protected_oe property

protected array $rawProduct
Résultat array

$status protected_oe property

protected int $status
Résultat integer

$unitPriceExcl protected_oe property

protected float $unitPriceExcl
Résultat float

$unitPriceInc protected_oe property

protected float $unitPriceInc
Résultat float

$updatedAt protected_oe property

protected $updatedAt

$validatedAt protected_oe property

protected DateTime $validatedAt
Résultat DateTime

$vatRate protected_oe property

protected float $vatRate
Résultat float