CoolCMS API

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
extends
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'

$priceWithVat

protected string $priceWithVat = '0.000'
Attributes
#[Column]
$name: 'price_with_vat'
$type: 'decimal'
$precision: 10
$scale: 3
#[ExternalReadonly]

$supplyKindId

protected int|null $supplyKindId = null
Attributes
#[Column]
$name: 'cms_system_supply_kinds_supply_kind_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]
#[ExternalReadonly]

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>

getPaymentMethod()

public getPaymentMethod() : TPaymentMethod|null
Return values
TPaymentMethod|null

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setOrder()

public setOrder(TOrder|null $order) : $this
Parameters
$order : TOrder|null
Return values
$this

setPaymentMethod()

public setPaymentMethod(TPaymentMethod|null $paymentMethod) : $this
Parameters
$paymentMethod : TPaymentMethod|null
Return values
$this

setPrice()

public setPrice(string $price) : $this
Parameters
$price : string
Return values
$this

setPriceWithVat()

public setPriceWithVat(string $priceWithVat) : $this
Parameters
$priceWithVat : string
Return values
$this

setSupplyKindId()

public setSupplyKindId(int|null $supplyKindId) : $this
Parameters
$supplyKindId : int|null
Return values
$this

setVat()

public setVat(string $vat) : $this
Parameters
$vat : string
Return values
$this

getTraitsRecursive()

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>
Return values
array<string, string>
On this page

Search results