PaymentGate
extends PaymentGate
in package
Admin variant of a payment gateway (`cms_system_payment_gates`), hydrated from the Api endpoint `api/system/payment-gate`; maps translations. The per-region price links (`PaymentGateRegionRel`) are not mapped yet.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_payment_gates'
- #[TableAlias]
- 'paymentGate'
Table of Contents
Properties
- $activated : bool
- $feePercents : string
- $finalPrices : bool
- $forUnlogged : bool
- $id : int|null
- $intermediarySupply : bool
- $regionRels : Collection<int, TRegionRel>
- $scriptName : string
- $settings : string|null
- $translations : Collection
Methods
- __construct() : mixed
- addRegionRel() : $this
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- clearRegionRels() : $this
- getActivated() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getFeePercents() : string
- getFinalPrices() : bool
- getForUnlogged() : bool
- getId() : int|null
- getIntermediarySupply() : bool
- getRegionRels() : Collection<int, TRegionRel>
- getRelByRegionId() : TRegionRel|null
- getScriptName() : string
- getSetting() : string|null
- Settings are one plain string of the form `key1[value1],key2[value2]…`.
- getSettings() : string|null
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isActivated() : bool
- isFinalPrices() : bool
- isForUnlogged() : bool
- isIntermediarySupply() : bool
- isPersisted() : bool
- regionRelCollectionInit() : void
- removeRegionRel() : $this
- removeTranslation() : $this
- setActivated() : $this
- setFeePercents() : $this
- setFinalPrices() : $this
- setForUnlogged() : $this
- setId() : $this
- setIntermediarySupply() : $this
- setRegionRels() : $this
- setScriptName() : $this
- setSettings() : $this
- setTranslations() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= false
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$feePercents
protected
string
$feePercents
= '0.000'
Attributes
- #[Column]
- $name: 'fee_percents'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$finalPrices
protected
bool
$finalPrices
= false
Attributes
- #[Column]
- $name: 'final_prices'
- $type: 'boolean'
$forUnlogged
protected
bool
$forUnlogged
= true
Attributes
- #[Column]
- $name: 'for_unlogged'
- $type: 'boolean'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'payment_gate_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$intermediarySupply
protected
bool
$intermediarySupply
= false
Attributes
- #[Column]
- $name: 'intermediary_supply'
- $type: 'boolean'
$regionRels
protected
Collection<int, TRegionRel>
$regionRels
= new ArrayCollection()
Attributes
- #[Transient]
$scriptName
protected
string
$scriptName
= ''
Attributes
- #[Column]
- $name: 'script_name'
- $type: 'string'
- $length: 45
$settings
protected
string|null
$settings
= null
Attributes
- #[Column]
- $name: 'settings'
- $type: 'text'
- $nullable: true
- #[FieldAccess]
- $read: Audience::Privileged
- $insert: Audience::Privileged
- $update: Audience::Privileged
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Admin\System\Models\Entities\PaymentGateText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Admin\System\Models\Entities\PaymentGateText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
Methods
__construct()
public
__construct([int|null $id = null ][, string $scriptName = '' ][, string|null $settings = null ][, bool $forUnlogged = true ][, bool $finalPrices = false ][, bool $intermediarySupply = false ][, bool $activated = false ][, string $feePercents = '0.000' ][, Collection $translations = new ArrayCollection() ][, Collection $regionRels = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $scriptName : string = ''
- $settings : string|null = null
- $forUnlogged : bool = true
- $finalPrices : bool = false
- $intermediarySupply : bool = false
- $activated : bool = false
- $feePercents : string = '0.000'
- $translations : Collection = new ArrayCollection()
- $regionRels : Collection = new ArrayCollection()
addRegionRel()
public
addRegionRel(TRegionRel $regionRel) : $this
Parameters
- $regionRel : TRegionRel
Return values
$thisaddTranslation()
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
clearRegionRels()
public
clearRegionRels() : $this
Return values
$thisgetActivated()
public
getActivated() : bool
Return values
boolgetAllTraits()
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>getFeePercents()
public
getFeePercents() : string
Return values
stringgetFinalPrices()
public
getFinalPrices() : bool
Return values
boolgetForUnlogged()
public
getForUnlogged() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetIntermediarySupply()
public
getIntermediarySupply() : bool
Return values
boolgetRegionRels()
public
getRegionRels() : Collection<int, TRegionRel>
Return values
Collection<int, TRegionRel>getRelByRegionId()
public
getRelByRegionId(int $paymentRegionId) : TRegionRel|null
Parameters
- $paymentRegionId : int
Return values
TRegionRel|nullgetScriptName()
public
getScriptName() : string
Return values
stringgetSetting()
Settings are one plain string of the form `key1[value1],key2[value2]…`.
public
getSetting(string $key) : string|null
The lookup must respect the key boundary, otherwise id is found inside client_id[…] and
GoPay goid could silently get client_id (and secret inside client_secret[…]). The
lookbehind therefore rejects a match preceded by a character usable in a key; a separator
(,, ], space, start of string) passes.
Parameters
- $key : string
Return values
string|nullgetSettings()
public
getSettings() : string|null
Return values
string|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isActivated()
public
isActivated() : bool
Return values
boolisFinalPrices()
public
isFinalPrices() : bool
Return values
boolisForUnlogged()
public
isForUnlogged() : bool
Return values
boolisIntermediarySupply()
public
isIntermediarySupply() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolregionRelCollectionInit()
public
regionRelCollectionInit() : void
removeRegionRel()
public
removeRegionRel(TRegionRel $regionRel) : $this
Parameters
- $regionRel : TRegionRel
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetFeePercents()
public
setFeePercents(string $feePercents) : $this
Parameters
- $feePercents : string
Return values
$thissetFinalPrices()
public
setFinalPrices(bool $finalPrices) : $this
Parameters
- $finalPrices : bool
Return values
$this —— generic class parameters are not named in self, hence $this (otherwise missingType.generics).
setForUnlogged()
public
setForUnlogged(bool $forUnlogged) : $this
Parameters
- $forUnlogged : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetIntermediarySupply()
public
setIntermediarySupply(bool $intermediarySupply) : $this
Parameters
- $intermediarySupply : bool
Return values
$this —— see setFinalPrices().
setRegionRels()
public
setRegionRels(Collection<int, TRegionRel>|array<int, TRegionRel> $regionRels) : $this
Parameters
- $regionRels : Collection<int, TRegionRel>|array<int, TRegionRel>
Return values
$thissetScriptName()
public
setScriptName(string $scriptName) : $this
Parameters
- $scriptName : string
Return values
$thissetSettings()
public
setSettings(string|null $settings) : $this
Parameters
- $settings : string|null
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
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>