PaymentMethod
extends PaymentMethod
in package
Has no price collection: the {@see PaymentMethodPrice} matrix hangs on {@see ShipperTariff::$paymentPrices}, not on the method.
Tags
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
$thiscallInitMethods()
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
boolgetId()
public
getId() : int|null
Return values
int|nullgetPaymentGate()
public
getPaymentGate() : TPaymentGate|null
Return values
TPaymentGate|nullgetSendProformaInvoice()
public
getSendProformaInvoice() : bool
Return values
boolgetSupplyKindId()
public
getSupplyKindId() : int|null
Return values
int|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getVat()
public
getVat() : TVat|null
Return values
TVat|nullisAvailable()
public
isAvailable() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAvailable()
public
setAvailable(bool $available) : $this
Parameters
- $available : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetPaymentGate()
public
setPaymentGate(TPaymentGate|null $paymentGate) : $this
Parameters
- $paymentGate : TPaymentGate|null
Return values
$thissetSendProformaInvoice()
public
setSendProformaInvoice(bool $sendProformaInvoice) : $this
Parameters
- $sendProformaInvoice : bool
Return values
$thissetSupplyKindId()
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
$thissetVat()
public
setVat(TVat|null $vat) : $this
Parameters
- $vat : TVat|null
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>