CoolCMS API

ProductSetFee extends ProductSetFee
in package

Fee: a named item with its own price time series ({@see ProductSetFeePrice}). Many-to-many to `ProductSet` is mapped on the owning side {@see ProductSet::$fees}.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_product_set_fees'
#[TableAlias]
'productSetFee'

Table of Contents

Properties

$feeType  : TFeeType|null
$id  : int|null
$prices  : Collection<int, ProductSetFeePrice>
$translations  : Collection

Methods

__construct()  : mixed
addPrice()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
clearPrices()  : $this
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getFeeType()  : TFeeType|null
getId()  : int|null
getPrices()  : Collection<int, TPrice>
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isPersisted()  : bool
priceCollectionInit()  : void
removePrice()  : $this
removeTranslation()  : $this
setFeeType()  : $this
setId()  : $this
setPrices()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$feeType

protected TFeeType|null $feeType = null
Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetFeeType::class
#[JoinColumn]
$name: 'cms_mod_eshop_product_set_fee_types_product_set_fee_type_id'
$referencedColumnName: 'product_set_fee_type_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductSetFeeType::class
$fetch: 'LAZY'

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'product_set_fee_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$prices

protected Collection<int, ProductSetFeePrice> $prices
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetFeePrice::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductSetFeePrice::class
$mappedBy: 'fee'
$cascade: ['persist', 'remove']
$orphanRemoval: true
$fetch: 'LAZY'

$translations

protected Collection $translations
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetFeeText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductSetFeeText::class
$mappedBy: 'parent'
$cascade: ['persist', 'remove']
$orphanRemoval: true
$fetch: 'LAZY'

Methods

__construct()

public __construct([int|null $id = null ][, mixed $feeType = null ][, Collection $translations = new ArrayCollection() ][, Collection $prices = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$feeType : mixed = null
$translations : Collection = new ArrayCollection()
$prices : Collection = new ArrayCollection()

addPrice()

public addPrice(TPrice $price) : $this
Parameters
$price : TPrice
Return values
$this

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

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>

getFeeType()

public getFeeType() : TFeeType|null
Return values
TFeeType|null

getPrices()

public getPrices() : Collection<int, TPrice>
Return values
Collection<int, TPrice>

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

removePrice()

public removePrice(TPrice $price) : $this
Parameters
$price : TPrice
Return values
$this

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setFeeType()

public setFeeType(TFeeType|null $feeType) : $this
Parameters
$feeType : TFeeType|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setPrices()

public setPrices(Collection<int, TPrice>|array<int, TPrice> $prices) : $this
Parameters
$prices : Collection<int, TPrice>|array<int, TPrice>
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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