CoolCMS API

TariffPrice extends TariffPrice
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_bazaar_advert_tariff_prices'
#[TableAlias]
'tariffPrice'

Table of Contents

Properties

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

Properties

$active

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

$currencyId

protected int|null $currencyId = null
Attributes
#[Column]
$name: 'cms_system_currencies_currency_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$paymentGateId

protected int|null $paymentGateId = null
Attributes
#[Column]
$name: 'cms_system_payment_gates_payment_gate_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$paymentRegionId

protected int|null $paymentRegionId = null
Attributes
#[Column]
$name: 'cms_system_payment_regions_payment_region_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$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\Admin\Bazaar\Models\Entities\Tariff::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_bazaar_advert_tariffs_advert_tariff_id'
$referencedColumnName: 'advert_tariff_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Bazaar\Models\Entities\Tariff::class
$inversedBy: 'prices'

$tariffId

protected int|null $tariffId = null
Attributes
#[Column]
$name: 'cms_mod_bazaar_advert_tariffs_advert_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|null $paymentRegionId = null ][, int|null $paymentGateId = null ][, int|null $currencyId = null ][, mixed $tariff = null ][, string $price = '0.000' ][, string|null $vatPercents = null ][, bool $active = true ]) : mixed
Parameters
$tariffId : int|null = null
$paymentRegionId : int|null = null
$paymentGateId : int|null = null
$currencyId : int|null = null
$tariff : mixed = null
$price : string = '0.000'
$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|null
Return values
int|null

getPaymentGateId()

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

getPaymentRegionId()

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

getPrice()

public getPrice() : string
Return values
string

getPriceAsFloat()

public getPriceAsFloat() : float
Return values
float

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

setCurrencyId()

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

setPaymentGateId()

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

setPaymentRegionId()

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

setPrice()

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

setPriceFromFloat()

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

setTariff()

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

setTariffId()

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

setVatPercents()

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

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