CoolCMS API

TariffPrice extends TariffPrice
in package

Attributes
#[Entity]
#[Table]
$name: 'cms_system_user_tariff_prices'
#[TableAlias]
'tariffPrice'

Table of Contents

Properties

$active  : bool
$currencyId  : int
$paymentGateId  : int
$paymentRegionId  : int
$price  : float
$tariff  : Tariff|null
$tariffId  : int|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.
getCurrencyId()  : int
getPaymentGateId()  : int
getPaymentRegionId()  : int
getPrice()  : float
getTariff()  : Tariff|null
getTariffId()  : int|null
getVatPercents()  : numeric-string|null
isActive()  : bool
setActive()  : $this
setCurrencyId()  : $this
setPaymentGateId()  : $this
setPaymentRegionId()  : $this
setPrice()  : $this
setTariff()  : $this
setTariffId()  : $this
setVatPercents()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = true
Attributes
#[Column]
$type: "boolean"
$name: "active"
$options: ["default" => 1]

$currencyId

protected int $currencyId = 0
Attributes
#[Column]
$type: "integer"
$name: "cms_system_currencies_currency_id"
#[Id]
#[Identity]

$paymentGateId

protected int $paymentGateId = 0
Attributes
#[Column]
$type: "integer"
$name: "cms_system_payment_gates_payment_gate_id"
#[Id]
#[Identity]

$paymentRegionId

protected int $paymentRegionId = 0
Attributes
#[Column]
$type: "integer"
$name: "cms_system_payment_regions_payment_region_id"
#[Id]
#[Identity]

$price

protected float $price = 0.0
Attributes
#[Column]
$type: "decimal"
$precision: 10
$scale: 3
$name: "price"
$options: ["default" => 0.0]

$tariff

protected Tariff|null $tariff = null
Attributes
#[EntityOf]
\App\UI\Front\System\Models\Entities\Tariff::class
#[Id]
#[JoinColumn]
$name: 'cms_system_user_tariffs_user_tariff_id'
$referencedColumnName: 'user_tariff_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\System\Models\Entities\Tariff::class
$inversedBy: 'prices'
#[ParentRef]

$tariffId

protected int|null $tariffId = null
Attributes
#[Column]
$name: "cms_system_user_tariffs_user_tariff_id"
$type: "integer"
$insertable: false
$updatable: false
$nullable: true
$options: ["unsigned" => true]

$vatPercents

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

Methods

__construct()

public __construct([int|null $tariffId = null ][, int $paymentRegionId = 0 ][, int $paymentGateId = 0 ][, int $currencyId = 0 ][, float $price = 0.0 ][, string|null $vatPercents = null ][, bool $active = true ]) : mixed
Parameters
$tariffId : int|null = null
$paymentRegionId : int = 0
$paymentGateId : int = 0
$currencyId : int = 0
$price : float = 0.0
$vatPercents : string|null = null
$active : bool = true

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>

getCurrencyId()

public getCurrencyId() : int
Return values
int

getPaymentGateId()

public getPaymentGateId() : int
Return values
int

getPaymentRegionId()

public getPaymentRegionId() : int
Return values
int

getPrice()

public getPrice() : float
Return values
float

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

setCurrencyId()

public setCurrencyId(int $currencyId) : $this
Parameters
$currencyId : int
Return values
$this

setPaymentGateId()

public setPaymentGateId(int $paymentGateId) : $this
Parameters
$paymentGateId : int
Return values
$this

setPaymentRegionId()

public setPaymentRegionId(int $paymentRegionId) : $this
Parameters
$paymentRegionId : int
Return values
$this

setPrice()

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

setTariffId()

public setTariffId(int|null $userTariffId) : $this
Parameters
$userTariffId : int|null
Return values
$this

setVatPercents()

public setVatPercents(int|float|string|null $vatPercents) : $this
Parameters
$vatPercents : int|float|string|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