ProductSetPrice
extends ProductSetPrice
in package
Append-only time series of valid-from prices; future prices are scheduled without a cron (views `max_published_time_for_prices`/`current_prices`, where `published_time <= now()`).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_product_set_prices'
- #[TableAlias]
- 'productSetPrice'
Table of Contents
Properties
- $currencyId : int|null
- $fromAmount : int|null
- $originalPrice : string
- $points : int
- $price : string
- $productSet : TProductSet|null
- $publishedTime : string|null
- $userGroupId : int|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCurrencyId() : int|null
- getFromAmount() : int|null
- getOriginalPrice() : string
- getOriginalPriceAsFloat() : float
- getPoints() : int
- getPrice() : string
- getPriceAsFloat() : float
- getProductSet() : TProductSet|null
- getPublishedTime() : string|null
- getUserGroupId() : int|null
- setCurrencyId() : $this
- setFromAmount() : $this
- setOriginalPrice() : $this
- setPoints() : $this
- setPrice() : $this
- setProductSet() : $this
- setPublishedTime() : $this
- setUserGroupId() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$currencyId
protected
int|null
$currencyId
= null
Attributes
- #[Column]
- $name: 'cms_system_currencies_currency_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$fromAmount
protected
int|null
$fromAmount
= null
Attributes
- #[Column]
- $name: 'from_amount'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$originalPrice
protected
string
$originalPrice
= '0.0000'
Attributes
- #[Column]
- $name: 'original_price'
- $type: 'decimal'
- $precision: 15
- $scale: 4
- $options: ['unsigned' => true]
$points
protected
int
$points
= 0
Attributes
- #[Column]
- $name: 'points'
- $type: 'integer'
- $options: ['unsigned' => true]
$price
protected
string
$price
= '0.0000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 15
- $scale: 4
- $options: ['unsigned' => true]
$productSet
protected
TProductSet|null
$productSet
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_sets_product_set_id'
- $referencedColumnName: 'product_set_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSet::class
- $inversedBy: 'prices'
$publishedTime
protected
string|null
$publishedTime
= null
Attributes
- #[Column]
- $name: 'published_time'
- $type: 'string'
- #[Id]
- #[Identity]
$userGroupId
protected
int|null
$userGroupId
= null
Attributes
- #[Column]
- $name: 'cms_system_user_groups_group_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
Methods
__construct()
public
__construct([mixed $productSet = null ][, string|null $publishedTime = null ][, int|null $fromAmount = null ][, int|null $userGroupId = null ][, int|null $currencyId = null ][, string $price = '0.0000' ][, string $originalPrice = '0.0000' ][, int $points = 0 ]) : mixed
Parameters
- $productSet : mixed = null
- $publishedTime : string|null = null
- $fromAmount : int|null = null
- $userGroupId : int|null = null
- $currencyId : int|null = null
- $price : string = '0.0000'
- $originalPrice : string = '0.0000'
- $points : int = 0
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
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|nullgetFromAmount()
public
getFromAmount() : int|null
Return values
int|nullgetOriginalPrice()
public
getOriginalPrice() : string
Return values
stringgetOriginalPriceAsFloat()
public
getOriginalPriceAsFloat() : float
Return values
floatgetPoints()
public
getPoints() : int
Return values
intgetPrice()
public
getPrice() : string
Return values
stringgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatgetProductSet()
public
getProductSet() : TProductSet|null
Return values
TProductSet|nullgetPublishedTime()
public
getPublishedTime() : string|null
Return values
string|nullgetUserGroupId()
public
getUserGroupId() : int|null
Return values
int|nullsetCurrencyId()
public
setCurrencyId(int|null $currencyId) : $this
Parameters
- $currencyId : int|null
Return values
$thissetFromAmount()
public
setFromAmount(int|null $fromAmount) : $this
Parameters
- $fromAmount : int|null
Return values
$thissetOriginalPrice()
public
setOriginalPrice(string $originalPrice) : $this
Parameters
- $originalPrice : string
Return values
$thissetPoints()
public
setPoints(int $points) : $this
Parameters
- $points : int
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetProductSet()
public
setProductSet(TProductSet|null $productSet) : $this
Parameters
- $productSet : TProductSet|null
Return values
$thissetPublishedTime()
public
setPublishedTime(string|null $publishedTime) : $this
Parameters
- $publishedTime : string|null
Return values
$thissetUserGroupId()
public
setUserGroupId(int|null $userGroupId) : $this
Parameters
- $userGroupId : int|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>