CoolCMS API

TariffPrice extends TariffPrice
in package

Tariff price for one payment region x payment gate x currency combination.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_discussion_message_tariff_prices'
#[TableAlias]
'TariffPrice'

Table of Contents

Properties

$active  : bool
$currency  : TCurrency|null
$paymentGate  : TPaymentGate|null
$paymentRegion  : TPaymentRegion|null
$price  : string
$tariff  : TTariff|null
$vatPercents  : numeric-string|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCurrency()  : TCurrency|null
getCurrencyId()  : int|null
getPaymentGate()  : TPaymentGate|null
getPaymentGateId()  : int|null
getPaymentRegion()  : TPaymentRegion|null
getPaymentRegionId()  : int|null
getPrice()  : string
getTariff()  : TTariff|null
getTariffId()  : int|null
getVatPercents()  : numeric-string|null
isActive()  : bool
setActive()  : $this
setCurrency()  : $this
setPaymentGate()  : $this
setPaymentRegion()  : $this
setPrice()  : $this
setTariff()  : $this
setVatPercents()  : TCurrency>
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

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

$currency

protected TCurrency|null $currency = null
Attributes
#[EntityOf]
\App\UI\Front\System\Models\Entities\Currency::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_currencies_currency_id'
$referencedColumnName: 'currency_id'
#[ManyToOne]
$targetEntity: \App\UI\Front\System\Models\Entities\Currency::class

$paymentGate

protected TPaymentGate|null $paymentGate = null
Attributes
#[EntityOf]
\App\UI\Front\System\Models\Entities\PaymentGate::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_payment_gates_payment_gate_id'
$referencedColumnName: 'payment_gate_id'
#[ManyToOne]
$targetEntity: \App\UI\Front\System\Models\Entities\PaymentGate::class

$paymentRegion

protected TPaymentRegion|null $paymentRegion = null
Attributes
#[EntityOf]
\App\UI\Front\System\Models\Entities\PaymentRegion::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_payment_regions_payment_region_id'
$referencedColumnName: 'payment_region_id'
#[ManyToOne]
$targetEntity: \App\UI\Front\System\Models\Entities\PaymentRegion::class

$price

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

$tariff

protected TTariff|null $tariff = null
Attributes
#[EntityOf]
\App\UI\Front\Discussion\Models\Entities\Tariff::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_discussion_message_tariffs_message_tariff_id'
$referencedColumnName: 'message_tariff_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\Discussion\Models\Entities\Tariff::class
$inversedBy: 'prices'

$vatPercents

protected numeric-string|null $vatPercents = null
Attributes
#[Column]
$name: 'vat_percents'
$type: 'decimal'
$precision: 5
$scale: 2
$nullable: true

Methods

__construct()

public __construct([mixed $tariff = null ][, mixed $paymentRegion = null ][, mixed $paymentGate = null ][, mixed $currency = null ][, string $price = '0.000' ][, string|null $vatPercents = null ][, bool $active = false ]) : mixed
Parameters
$tariff : mixed = null
$paymentRegion : mixed = null
$paymentGate : mixed = null
$currency : mixed = null
$price : string = '0.000'
$vatPercents : string|null = null
$active : bool = false

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getActive()

public getActive() : 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>

getCurrency()

public getCurrency() : TCurrency|null
Return values
TCurrency|null

getCurrencyId()

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

getPaymentGate()

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

getPaymentGateId()

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

getPaymentRegion()

public getPaymentRegion() : TPaymentRegion|null
Return values
TPaymentRegion|null

getPaymentRegionId()

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

getPrice()

public getPrice() : string
Return values
string

getTariff()

public getTariff() : TTariff|null
Return values
TTariff|null

getTariffId()

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

getVatPercents()

public getVatPercents() : numeric-string|null
Return values
numeric-string|null

isActive()

public isActive() : bool
Return values
bool

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setCurrency()

public setCurrency(TCurrency|null $currency) : $this
Parameters
$currency : TCurrency|null
Return values
$this

setPaymentGate()

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

setPaymentRegion()

public setPaymentRegion(TPaymentRegion|null $paymentRegion) : $this
Parameters
$paymentRegion : TPaymentRegion|null
Return values
$this

setPrice()

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

setTariff()

public setTariff(TTariff|null $tariff) : $this
Parameters
$tariff : TTariff|null
Return values
$this

setVatPercents()

public setVatPercents(int|float|string|null $vatPercents) : TCurrency>
Parameters
$vatPercents : int|float|string|null
Return values
TCurrency>

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