TariffPrice
extends TariffPrice
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_comcat_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\Comcat\Models\Entities\Tariff::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_mod_comcat_advert_tariffs_advert_tariff_id'
- $referencedColumnName: 'advert_tariff_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Admin\Comcat\Models\Entities\Tariff::class
- $inversedBy: 'prices'
$tariffId
protected
int|null
$tariffId
= null
Attributes
- #[Column]
- $name: 'cms_mod_comcat_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
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>getCurrencyId()
public
getCurrencyId() : int|null
Return values
int|nullgetPaymentGateId()
public
getPaymentGateId() : int|null
Return values
int|nullgetPaymentRegionId()
public
getPaymentRegionId() : int|null
Return values
int|nullgetPrice()
public
getPrice() : string
Return values
stringgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatgetTariff()
public
getTariff() : TTariff|null
Return values
TTariff|nullgetTariffId()
public
getTariffId() : int|null
Return values
int|nullgetVatPercents()
public
getVatPercents() : numeric-string|null
Return values
numeric-string|nullisActive()
public
isActive() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetCurrencyId()
public
setCurrencyId(int|null $currencyId) : $this
Parameters
- $currencyId : int|null
Return values
$thissetPaymentGateId()
public
setPaymentGateId(int|null $paymentGateId) : $this
Parameters
- $paymentGateId : int|null
Return values
$thissetPaymentRegionId()
public
setPaymentRegionId(int|null $paymentRegionId) : $this
Parameters
- $paymentRegionId : int|null
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetPriceFromFloat()
public
setPriceFromFloat(float $price) : $this
Parameters
- $price : float
Return values
$thissetTariff()
public
setTariff(TTariff|null $tariff) : $this
Parameters
- $tariff : TTariff|null
Return values
$thissetTariffId()
public
setTariffId(int|null $tariffId) : $this
Parameters
- $tariffId : int|null
Return values
$thissetVatPercents()
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>