CoolCMS API

ProductSetFee extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait, PriceCollectionTrait

AbstractYes

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
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'productSetFee'

Table of Contents

Interfaces

IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

Properties

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

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

$id

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

$prices

protected Collection<int, TPrice> $prices = new ArrayCollection()

$translations

protected Collection<int, TTranslation> $translations = new ArrayCollection()

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