CoolCMS API

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
extends
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
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSet::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_eshop_product_sets_product_set_id'
$referencedColumnName: 'product_set_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\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|null

getFromAmount()

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

getOriginalPrice()

public getOriginalPrice() : string
Return values
string

getOriginalPriceAsFloat()

public getOriginalPriceAsFloat() : float
Return values
float

getPriceAsFloat()

public getPriceAsFloat() : float
Return values
float

getProductSet()

public getProductSet() : TProductSet|null
Return values
TProductSet|null

getPublishedTime()

public getPublishedTime() : string|null
Return values
string|null

getUserGroupId()

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

setCurrencyId()

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

setFromAmount()

public setFromAmount(int|null $fromAmount) : $this
Parameters
$fromAmount : int|null
Return values
$this

setOriginalPrice()

public setOriginalPrice(string $originalPrice) : $this
Parameters
$originalPrice : string
Return values
$this

setPoints()

public setPoints(int $points) : $this
Parameters
$points : int
Return values
$this

setPrice()

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

setProductSet()

public setProductSet(TProductSet|null $productSet) : $this
Parameters
$productSet : TProductSet|null
Return values
$this

setPublishedTime()

public setPublishedTime(string|null $publishedTime) : $this
Parameters
$publishedTime : string|null
Return values
$this

setUserGroupId()

public setUserGroupId(int|null $userGroupId) : $this
Parameters
$userGroupId : int|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