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
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
- #[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\Api\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
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetFeePrice::class
- $mappedBy: 'fee'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$translations
protected
Collection
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\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
$thisaddTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
clearPrices()
public
clearPrices() : $this
Return values
$thisgetAllTraits()
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|nullgetId()
public
getId() : int|null
Return values
int|nullgetPrices()
public
getPrices() : Collection<int, TPrice>
Return values
Collection<int, TPrice>getTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isPersisted()
public
isPersisted() : bool
Return values
boolpriceCollectionInit()
public
priceCollectionInit() : void
removePrice()
public
removePrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetFeeType()
public
setFeeType(TFeeType|null $feeType) : $this
Parameters
- $feeType : TFeeType|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetPrices()
public
setPrices(Collection<int, TPrice>|array<int, TPrice> $prices) : $this
Parameters
- $prices : Collection<int, TPrice>|array<int, TPrice>
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>