OrderPaymentMethod
extends OrderPaymentMethod
in package
1:1 snapshot of the order's payment method (PK = order; owned FK in the PK). `price` is the payment surcharge without VAT plus the rate (binding rule: it is entered without VAT), `priceWithVat` is computed by `OrderCalculator`. The method is a reference only (`SET NULL`).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_order_payment_methods'
- #[TableAlias]
- 'orderPaymentMethod'
Table of Contents
Properties
- $name : string
- $order : Order|null
- $paymentMethod : TPaymentMethod|null
- $price : string
- $priceWithVat : string
- $supplyKindId : int|null
- $vat : string
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getName() : string
- getOrder() : TOrder|null
- getPaymentMethod() : TPaymentMethod|null
- getPrice() : string
- getPriceWithVat() : string
- getSupplyKindId() : int|null
- getVat() : string
- getVatAsFloat() : float
- setName() : $this
- setOrder() : $this
- setPaymentMethod() : $this
- setPrice() : $this
- setPriceWithVat() : $this
- setSupplyKindId() : $this
- setVat() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$name
protected
string
$name
= ''
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 255
$order
protected
Order|null
$order
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_orders_order_id'
- $referencedColumnName: 'order_id'
- $onDelete: 'CASCADE'
- #[OneToOne]
- $targetEntity: \App\UI\Admin\Eshop\Models\Entities\Order::class
- $inversedBy: 'paymentMethod'
- #[ParentRef]
$paymentMethod
protected
TPaymentMethod|null
$paymentMethod
= null
Attributes
- #[EntityOf]
- \App\UI\Admin\Eshop\Models\Entities\PaymentMethod::class
- #[JoinColumn]
- $name: 'cms_mod_eshop_payment_methods_payment_method_id'
- $referencedColumnName: 'payment_method_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Admin\Eshop\Models\Entities\PaymentMethod::class
- $fetch: 'LAZY'
$price
protected
string
$price
= '0.000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$priceWithVat
protected
string
$priceWithVat
= '0.000'
Attributes
- #[Column]
- $name: 'price_with_vat'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$supplyKindId
protected
int|null
$supplyKindId
= null
Attributes
- #[Column]
- $name: 'cms_system_supply_kinds_supply_kind_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$vat
protected
string
$vat
= '0.00'
Attributes
- #[Column]
- $name: 'vat'
- $type: 'decimal'
- $precision: 5
- $scale: 2
Methods
__construct()
public
__construct([mixed $order = null ][, mixed $paymentMethod = null ][, string $name = '' ][, string $price = '0.000' ][, string $priceWithVat = '0.000' ][, string $vat = '0.00' ][, int|null $supplyKindId = null ]) : mixed
Parameters
- $order : mixed = null
- $paymentMethod : mixed = null
- $name : string = ''
- $price : string = '0.000'
- $priceWithVat : string = '0.000'
- $vat : string = '0.00'
- $supplyKindId : int|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getName()
public
getName() : string
Return values
stringgetOrder()
public
getOrder() : TOrder|null
Return values
TOrder|nullgetPaymentMethod()
public
getPaymentMethod() : TPaymentMethod|null
Return values
TPaymentMethod|nullgetPrice()
public
getPrice() : string
Return values
stringgetPriceWithVat()
public
getPriceWithVat() : string
Return values
stringgetSupplyKindId()
public
getSupplyKindId() : int|null
Return values
int|nullgetVat()
public
getVat() : string
Return values
stringgetVatAsFloat()
public
getVatAsFloat() : float
Return values
floatsetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetOrder()
public
setOrder(TOrder|null $order) : $this
Parameters
- $order : TOrder|null
Return values
$thissetPaymentMethod()
public
setPaymentMethod(TPaymentMethod|null $paymentMethod) : $this
Parameters
- $paymentMethod : TPaymentMethod|null
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetPriceWithVat()
public
setPriceWithVat(string $priceWithVat) : $this
Parameters
- $priceWithVat : string
Return values
$thissetSupplyKindId()
public
setSupplyKindId(int|null $supplyKindId) : $this
Parameters
- $supplyKindId : int|null
Return values
$thissetVat()
public
setVat(string $vat) : $this
Parameters
- $vat : string
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>