CoolCMS API

PaymentMethod extends PaymentMethod
in package

Has no price collection: the {@see PaymentMethodPrice} matrix hangs on {@see ShipperTariff::$paymentPrices}, not on the method.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_payment_methods'
#[TableAlias]
'paymentMethod'

Table of Contents

Properties

$available  : bool
$id  : int|null
$paymentGate  : TPaymentGate|null
$sendProformaInvoice  : bool
$supplyKindId  : int|null
$translations  : Collection
$vat  : TVat|null

Methods

__construct()  : mixed
addTranslation()  : $this
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.
getAvailable()  : bool
getId()  : int|null
getPaymentGate()  : TPaymentGate|null
getSendProformaInvoice()  : bool
getSupplyKindId()  : int|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getVat()  : TVat|null
isAvailable()  : bool
isPersisted()  : bool
removeTranslation()  : $this
setAvailable()  : $this
setId()  : $this
setPaymentGate()  : $this
setSendProformaInvoice()  : $this
setSupplyKindId()  : TTranslation>
setTranslations()  : $this
setVat()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$available

protected bool $available = true
Attributes
#[Column]
$name: 'available'
$type: 'boolean'

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'payment_method_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$paymentGate

protected TPaymentGate|null $paymentGate = null
Attributes
#[JoinColumn]
$name: 'cms_system_payment_gates_payment_gate_id'
$referencedColumnName: 'payment_gate_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\PaymentGate::class
$fetch: 'LAZY'

$sendProformaInvoice

protected bool $sendProformaInvoice = false
Attributes
#[Column]
$name: 'send_proforma_invoice'
$type: 'boolean'

$supplyKindId

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

$translations

protected Collection $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Eshop\Models\Entities\PaymentMethodText::class
$mappedBy: 'parent'
$cascade: ['persist', 'remove']
$orphanRemoval: true
$fetch: 'LAZY'

$vat

protected TVat|null $vat = null
Attributes
#[JoinColumn]
$name: 'cms_system_vats_vat_id'
$referencedColumnName: 'vat_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\Vat::class
$fetch: 'LAZY'

Methods

__construct()

public __construct([int|null $id = null ][, mixed $vat = null ][, mixed $paymentGate = null ][, bool $sendProformaInvoice = false ][, bool $available = true ][, Collection $translations = new ArrayCollection() ][, int|null $supplyKindId = null ]) : mixed
Parameters
$id : int|null = null
$vat : mixed = null
$paymentGate : mixed = null
$sendProformaInvoice : bool = false
$available : bool = true
$translations : Collection = new ArrayCollection()
$supplyKindId : int|null = null

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

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>

getAvailable()

public getAvailable() : bool
Return values
bool

getPaymentGate()

public getPaymentGate() : TPaymentGate|null
Return values
TPaymentGate|null

getSendProformaInvoice()

public getSendProformaInvoice() : bool
Return values
bool

getSupplyKindId()

public getSupplyKindId() : int|null
Return values
int|null

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

getVat()

public getVat() : TVat|null
Return values
TVat|null

isAvailable()

public isAvailable() : bool
Return values
bool

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setAvailable()

public setAvailable(bool $available) : $this
Parameters
$available : bool
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setPaymentGate()

public setPaymentGate(TPaymentGate|null $paymentGate) : $this
Parameters
$paymentGate : TPaymentGate|null
Return values
$this

setSendProformaInvoice()

public setSendProformaInvoice(bool $sendProformaInvoice) : $this
Parameters
$sendProformaInvoice : bool
Return values
$this

setSupplyKindId()

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

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$this

setVat()

public setVat(TVat|null $vat) : $this
Parameters
$vat : TVat|null
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