CategoryPrice
extends BaseEntity
in package
implements
CategoryPriceInterface
AbstractYes
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'categoryPrice'
Table of Contents
Interfaces
- CategoryPriceInterface
- Advert category price in a payment region and currency; the "From …" price on the list is computed from it ({@see \App\Core\Base\Shared\Bazaar\Models\Entities\Category::getMinPriceForPaymentRegion()}).
Properties
- $active : bool
- $category : TCategory|null
- $categoryId : int|null
- $currencyId : int|null
- $paymentGateId : int|null
- $paymentRegionId : int|null
- $price : string
- $priceForUnlogged : 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.
- getCategory() : TCategory|null
- getCategoryId() : int|null
- getCurrencyId() : int|null
- getPaymentGateId() : int|null
- getPaymentRegionId() : int|null
- getPrice() : string
- Returns the price as a decimal string.
- getPriceAsFloat() : float
- getPriceForUnlogged() : string|null
- getPriceForUnloggedAsFloat() : float|null
- isActive() : bool
- Returns whether the price counts; an inactive price (gateway disabled in the region) is excluded from the minimum.
- setActive() : $this
- setCategory() : $this
- setCategoryId() : $this
- setCurrencyId() : $this
- setPaymentGateId() : $this
- setPaymentRegionId() : $this
- setPrice() : $this
- setPriceForUnlogged() : $this
- setPriceForUnloggedFromFloat() : $this
- setPriceFromFloat() : $this
- 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'
$category
protected
TCategory|null
$category
= null
$categoryId
protected
int|null
$categoryId
= null
Attributes
- #[Column]
- $name: 'cms_mod_comcat_categories_category_id'
- $type: 'integer'
- $insertable: false
- $updatable: false
- $nullable: true
- $options: ['unsigned' => true]
$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
$priceForUnlogged
protected
string|null
$priceForUnlogged
= null
Attributes
- #[Column]
- $name: 'price_for_unlogged'
- $type: 'decimal'
- $precision: 10
- $scale: 3
- $nullable: true
Methods
__construct()
public
__construct([mixed $category = null ][, int|null $categoryId = null ][, int|null $paymentRegionId = null ][, int|null $paymentGateId = null ][, int|null $currencyId = null ][, string $price = '0.000' ][, string|null $priceForUnlogged = null ][, bool $active = true ]) : mixed
Parameters
- $category : mixed = null
- $categoryId : int|null = null
- $paymentRegionId : int|null = null
- $paymentGateId : int|null = null
- $currencyId : int|null = null
- $price : string = '0.000'
- $priceForUnlogged : 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>getCategory()
public
getCategory() : TCategory|null
Return values
TCategory|nullgetCategoryId()
public
getCategoryId() : int|null
Return values
int|nullgetCurrencyId()
public
getCurrencyId() : int|null
Return values
int|nullgetPaymentGateId()
public
getPaymentGateId() : int|null
Return values
int|nullgetPaymentRegionId()
public
getPaymentRegionId() : int|null
Return values
int|nullgetPrice()
Returns the price as a decimal string.
public
getPrice() : string
Return values
stringgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatgetPriceForUnlogged()
public
getPriceForUnlogged() : string|null
Return values
string|nullgetPriceForUnloggedAsFloat()
public
getPriceForUnloggedAsFloat() : float|null
Return values
float|nullisActive()
Returns whether the price counts; an inactive price (gateway disabled in the region) is excluded from the minimum.
public
isActive() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetCategory()
public
setCategory(TCategory|null $category) : $this
Parameters
- $category : TCategory|null
Return values
$thissetCategoryId()
public
setCategoryId(int|null $categoryId) : $this
Parameters
- $categoryId : int|null
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
$thissetPriceForUnlogged()
public
setPriceForUnlogged(string|null $priceForUnlogged) : $this
Parameters
- $priceForUnlogged : string|null
Return values
$thissetPriceForUnloggedFromFloat()
public
setPriceForUnloggedFromFloat(float|null $priceForUnlogged) : $this
Parameters
- $priceForUnlogged : float|null
Return values
$thissetPriceFromFloat()
public
setPriceFromFloat(float $price) : $this
Parameters
- $price : float
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>