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
- #[Id]
- #[JoinColumn]
- $name: 'cms_system_user_tariffs_user_tariff_id'
- $referencedColumnName: 'user_tariff_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\Tariff::class
- $inversedBy: 'prices'
$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
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
Return values
intgetPaymentGateId()
public
getPaymentGateId() : int
Return values
intgetPaymentRegionId()
public
getPaymentRegionId() : int
Return values
intgetPrice()
public
getPrice() : float
Return values
floatgetTariff()
public
getTariff() : Tariff|null
Return values
Tariff|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 $currencyId) : $this
Parameters
- $currencyId : int
Return values
$thissetPaymentGateId()
public
setPaymentGateId(int $paymentGateId) : $this
Parameters
- $paymentGateId : int
Return values
$thissetPaymentRegionId()
public
setPaymentRegionId(int $paymentRegionId) : $this
Parameters
- $paymentRegionId : int
Return values
$thissetPrice()
public
setPrice(float $price) : $this
Parameters
- $price : float
Return values
$thissetTariff()
public
setTariff(Tariff|null $tariff) : $this
Parameters
- $tariff : Tariff|null
Return values
$thissetTariffId()
public
setTariffId(int|null $userTariffId) : $this
Parameters
- $userTariffId : int|null
Return values
$thissetVatPercents()
public
setVatPercents(int|float|string|null $vatPercents) : $this
Parameters
- $vatPercents : int|float|string|null
Return values
$thisgetTraitsRecursive()
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>