CoolCMS API

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

$feePercents

protected string $feePercents = '0.000'
Attributes
#[Column]
$name: 'fee_percents'
$type: 'decimal'
$precision: 10
$scale: 3

$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'
#[ExternalReadonly]

$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
$this

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

getActivated()

public getActivated() : bool
Return values
bool

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>

getFeePercents()

public getFeePercents() : string
Return values
string

getFinalPrices()

public getFinalPrices() : bool
Return values
bool

getForUnlogged()

public getForUnlogged() : bool
Return values
bool

getIntermediarySupply()

public getIntermediarySupply() : bool
Return values
bool

getRegionRels()

public getRegionRels() : Collection<int, TRegionRel>
Return values
Collection<int, TRegionRel>

getRelByRegionId()

public getRelByRegionId(int $paymentRegionId) : TRegionRel|null
Parameters
$paymentRegionId : int
Return values
TRegionRel|null

getScriptName()

public getScriptName() : string
Return values
string

getSetting()

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|null

getSettings()

public getSettings() : string|null
Return values
string|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>

isActivated()

public isActivated() : bool
Return values
bool

isFinalPrices()

public isFinalPrices() : bool
Return values
bool

isForUnlogged()

public isForUnlogged() : bool
Return values
bool

isIntermediarySupply()

public isIntermediarySupply() : bool
Return values
bool

removeRegionRel()

public removeRegionRel(TRegionRel $regionRel) : $this
Parameters
$regionRel : TRegionRel
Return values
$this

removeTranslation()

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

setActivated()

public setActivated(bool $activated) : $this
Parameters
$activated : bool
Return values
$this

setFeePercents()

public setFeePercents(string $feePercents) : $this
Parameters
$feePercents : string
Return values
$this

setFinalPrices()

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
$this

setId()

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

setIntermediarySupply()

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
$this

setScriptName()

public setScriptName(string $scriptName) : $this
Parameters
$scriptName : string
Return values
$this

setSettings()

public setSettings(string|null $settings) : $this
Parameters
$settings : string|null
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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