ProductSet
extends ProductSet
in package
Main sellable entity. `typeId = PRODUCT(1)` is the sales card of exactly one physical variant (`$variant`, unique column); `typeId = BUNDLE(2)` is a set composed of other sets (`$setItems`, including finished bundles, recursively; see `SetCompositionService`).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_product_sets'
- #[TableAlias]
- 'productSet'
Table of Contents
Properties
- $accessories : Collection<int, ProductSetAccessory>
- $activated : bool
- $asset : TImage|null
- $assetRels : Collection<int, ProductSetImageRel>
- $code : string
- $commentThread : CommentThread|null
- $deleted : bool
- $ean : string|null
- $fees : Collection<int, ProductSetFee>
- $freeDelivery : bool
- $freePayment : bool
- $id : int|null
- $importIncomplete : bool
- $insertTime : DateTime
- $isbn : string|null
- $links : Collection<int, ProductSetLink>
- $parameterRels : Collection<int, ProductSetParameterRel>
- $price : string
- $prices : Collection<int, ProductSetPrice>
- $product : TProduct|null
- $productState : TProductState|null
- $publishTime : DateTime|null
- $ratingThread : RatingThread|null
- $setItems : Collection<int, SetItemRel>
- $supplyKindId : int|null
- $tags : Collection<int, ProductTag>
- $translations : Collection<int, ProductSetText>
- $typeId : int
- $unit : string
- $unitId : int|null
- $unpublishTime : DateTime|null
- $updateTime : DateTime|null
- $variant : TProductVariant|null
- Sold variant, only for `typeId = PRODUCT` (1:1, unique column); a bundle always has null and is composed via `$setItems`. The mapping comes from the Api/Admin leaf.
- $vat : TVat|null
- $warranty : int
- $weight : string
- $parameterEditorKeys : array<string, true>
- $parameterIndex : array<string, array<int, string|null>>|null
- $parameterRenderModes : array<string, ContentFilterMode}>
- $renderBlacklistedWords : array<string|int, string>
- $renderUrlsAllowed : bool
- Render-time URL replacement (`disallowUrl` is `OnRender`) is skipped; set by the presenter for a paid "Show links" tariff.
Methods
- __construct() : mixed
- accessoryCollectionInit() : void
- addAccessory() : $this
- addAssetRel() : $this
- addFee() : $this
- addLink() : $this
- addParameterRel() : $this
- addPrice() : $this
- addSetItem() : $this
- addTag() : $this
- addTranslation() : $this
- assetRelCollectionInit() : void
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- clearAccessories() : $this
- clearFees() : $this
- clearLinks() : $this
- clearParameterRels() : $this
- clearPrices() : $this
- clearSetItems() : $this
- clearTags() : $this
- feeCollectionInit() : void
- get() : mixed
- Returns the parameter value by its key.
- getAccessories() : Collection<int, TAccessory>
- getActivated() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getAsset() : TImage|null
- getAssetRels() : Collection<int, TAssetRel>
- getAssets() : array<int, mixed>
- Assets of the non-removed rels, ordered by `order` — whatever the rel's untyped `getAsset()` holds (asset entity, or null).
- getCode() : string
- getCommentThread() : object|null
- getCommentThreadId() : int|null
- getDeleted() : bool
- getEan() : string|null
- getFees() : Collection<int, TFee>
- getFreeDelivery() : bool
- getFreePayment() : bool
- getId() : int|null
- getImportIncomplete() : bool
- getInsertTime() : DateTime
- getIsbn() : string|null
- getLinks() : Collection<int, TLink>
- getMainAsset() : Asset|null
- getParameterRels() : Collection<int, TParameterRel>
- getPrice() : string
- getPriceAsFloat() : float
- getPrices() : Collection<int, TPrice>
- getProduct() : TProduct|null
- getProductState() : TProductState|null
- getPublishTime() : DateTime|null
- getRatingThread() : object|null
- getRatingThreadId() : int|null
- getSetItems() : Collection<int, TSetItemRel>
- getString() : string
- Returns the parameter value as text (titles, meta, OG) with the content filter, like {@see get()}.
- getSupplyKindId() : int|null
- getTagIds() : array<int, int|null>
- getTags() : Collection<int, TTag>
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getTypeId() : int
- getUnit() : string
- getUnitId() : int|null
- getUnpublishTime() : DateTime|null
- getUpdateTime() : DateTime|null
- getVariant() : TProductVariant|null
- getVariantId() : int|null
- getVat() : TVat|null
- getWarranty() : int
- getWeight() : string
- getWeightAsFloat() : float
- isActivated() : bool
- isDeleted() : bool
- isFreeDelivery() : bool
- isFreePayment() : bool
- isImportIncomplete() : bool
- isPersisted() : bool
- linkCollectionInit() : void
- parameterRelCollectionInit() : void
- priceCollectionInit() : void
- removeAccessory() : $this
- removeAssetRel() : $this
- removeFee() : $this
- removeLink() : $this
- removeParameterRel() : $this
- removePrice() : $this
- removeSetItem() : $this
- removeTag() : $this
- removeTranslation() : $this
- setAccessories() : $this
- setActivated() : $this
- setAsset() : $this
- setAssetRels() : $this
- IMPORTANT: the parameter type must be `Collection`, not `ArrayCollection`; the keep branch of the Api `SaveTrait` can pass a `PersistentCollection` from a managed entity, and a narrower type would throw a `TypeError` and fail the save.
- setCode() : $this
- setCommentThread() : $this
- setDeleted() : $this
- setEan() : $this
- setFees() : $this
- setFreeDelivery() : $this
- setFreePayment() : $this
- setId() : $this
- setImportIncomplete() : $this
- setInsertTime() : $this
- setIsbn() : $this
- setItemCollectionInit() : void
- setLinks() : $this
- setParameterRels() : $this
- setPrice() : $this
- setPrices() : $this
- setProduct() : $this
- setProductState() : $this
- setPublishTime() : $this
- setRatingThread() : $this
- setRenderBlacklistedWords() : $this
- Sets the context for the render-time content filter: the deny-listed words in the target language.
- setRenderUrlsAllowed() : $this
- Lets web addresses through the render-time filter (the advert has an active "Show links" tariff, {@see \App\Core\Config\AdvertLinksConfig}). Only the `OnRender` mode is skipped: with `OnSave` the database already holds the placeholder.
- setSetItems() : $this
- setSupplyKindId() : TParameterRel>
- setTags() : $this
- setTranslations() : $this
- setTypeId() : $this
- setUnit() : $this
- setUnitId() : $this
- setUnpublishTime() : $this
- setUpdateTime() : $this
- setVariant() : $this
- setVat() : $this
- setWarranty() : $this
- setWeight() : $this
- tagCollectionInit() : void
- translationCollectionInit() : void
- usesEditor() : bool
- Returns whether the parameter value is editor HTML (`useEditor`).
- buildParameterIndex() : array<string, array<int, string|null>>
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$accessories
protected
Collection<int, ProductSetAccessory>
$accessories
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetAccessory::class
- $mappedBy: 'productSet'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$activated
protected
bool
$activated
= true
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$asset
protected
TImage|null
$asset
= null
main image
Attributes
- #[JoinColumn]
- $name: 'cms_system_images_image_id'
- $referencedColumnName: 'image_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\Asset::class
- $fetch: 'LAZY'
$assetRels
protected
Collection<int, ProductSetImageRel>
$assetRels
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetImageRel::class
- $mappedBy: 'productSet'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$code
protected
string
$code
= ''
Attributes
- #[Column]
- $name: 'code'
- $type: 'string'
- $length: 20
$commentThread
protected
CommentThread|null
$commentThread
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_base_comment_threads_comment_thread_id'
- $referencedColumnName: 'comment_thread_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Base\Models\Entities\CommentThread::class
- $fetch: 'LAZY'
$deleted
protected
bool
$deleted
= false
Attributes
- #[Column]
- $name: 'deleted'
- $type: 'boolean'
$ean
protected
string|null
$ean
= null
Attributes
- #[Column]
- $name: 'ean'
- $type: 'string'
- $length: 45
- $nullable: true
$fees
protected
Collection<int, ProductSetFee>
$fees
Attributes
- #[JoinTable]
- $name: 'cms_mod_eshop_product_set_fee_relations'
- $joinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_sets_product_set_id', referencedColumnName: 'product_set_id', onDelete: 'CASCADE')]
- $inverseJoinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_set_fees_product_set_fee_id', referencedColumnName: 'product_set_fee_id', onDelete: 'CASCADE')]
- #[ManyToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetFee::class
- $fetch: 'LAZY'
$freeDelivery
protected
bool
$freeDelivery
= false
Attributes
- #[Column]
- $name: 'free_delivery'
- $type: 'boolean'
$freePayment
protected
bool
$freePayment
= false
Attributes
- #[Column]
- $name: 'free_payment'
- $type: 'boolean'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'product_set_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$importIncomplete
protected
bool
$importIncomplete
= false
Attributes
- #[Column]
- $name: 'import_incomplete'
- $type: 'boolean'
$insertTime
protected
DateTime
$insertTime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_time'
- $type: 'datetime'
$isbn
protected
string|null
$isbn
= null
Attributes
- #[Column]
- $name: 'isbn'
- $type: 'string'
- $length: 45
- $nullable: true
$links
protected
Collection<int, ProductSetLink>
$links
Attributes
- #[JoinTable]
- $name: 'cms_mod_eshop_product_set_link_relations'
- $joinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_sets_product_set_id', referencedColumnName: 'product_set_id', onDelete: 'CASCADE')]
- $inverseJoinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_set_links_product_set_link_id', referencedColumnName: 'product_set_link_id', onDelete: 'CASCADE')]
- #[ManyToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetLink::class
- $fetch: 'LAZY'
$parameterRels
protected
Collection<int, ProductSetParameterRel>
$parameterRels
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetParameterRel::class
- $mappedBy: 'productSet'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$price
protected
string
$price
= '0.0000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 15
- $scale: 4
- $options: ['unsigned' => true]
$prices
protected
Collection<int, ProductSetPrice>
$prices
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetPrice::class
- $mappedBy: 'productSet'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$product
protected
TProduct|null
$product
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_products_product_id'
- $referencedColumnName: 'product_id'
- $nullable: true
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\Product::class
- $fetch: 'LAZY'
$productState
protected
TProductState|null
$productState
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_states_product_state_id'
- $referencedColumnName: 'product_state_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductState::class
- $fetch: 'LAZY'
$publishTime
protected
DateTime|null
$publishTime
= null
Attributes
- #[Column]
- $name: 'publish_time'
- $type: 'datetime'
- $nullable: true
$ratingThread
protected
RatingThread|null
$ratingThread
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_base_rating_threads_rating_thread_id'
- $referencedColumnName: 'rating_thread_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Base\Models\Entities\RatingThread::class
- $fetch: 'LAZY'
$setItems
protected
Collection<int, SetItemRel>
$setItems
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\SetItemRel::class
- $mappedBy: 'productSet'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$supplyKindId
protected
int|null
$supplyKindId
= null
Attributes
- #[Column]
- $name: 'cms_system_supply_kinds_supply_kind_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$tags
protected
Collection<int, ProductTag>
$tags
Attributes
- #[JoinTable]
- $name: 'cms_mod_eshop_product_set_tag_relations'
- $joinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_sets_product_set_id', referencedColumnName: 'product_set_id', onDelete: 'CASCADE')]
- $inverseJoinColumns: [new \Doctrine\ORM\Mapping\JoinColumn(name: 'cms_mod_eshop_product_tags_tag_id', referencedColumnName: 'tag_id', onDelete: 'CASCADE')]
- #[ManyToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductTag::class
- $fetch: 'LAZY'
$translations
protected
Collection<int, ProductSetText>
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductSetText::class
- $mappedBy: 'parent'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$typeId
protected
int
$typeId
= 1
Attributes
- #[Column]
- $name: 'type_id'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 1]
$unit
protected
string
$unit
= 'ks'
Attributes
- #[Column]
- $name: 'unit'
- $type: 'string'
- $length: 20
$unitId
protected
int|null
$unitId
= null
Attributes
- #[Column]
- $name: 'cms_system_units_unit_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$unpublishTime
protected
DateTime|null
$unpublishTime
= null
Attributes
- #[Column]
- $name: 'unpublish_time'
- $type: 'datetime'
- $nullable: true
$updateTime
protected
DateTime|null
$updateTime
= null
Attributes
- #[Column]
- $name: 'update_time'
- $type: 'datetime'
- $nullable: true
$variant
Sold variant, only for `typeId = PRODUCT` (1:1, unique column); a bundle always has null and is composed via `$setItems`. The mapping comes from the Api/Admin leaf.
protected
TProductVariant|null
$variant
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_variants_product_variant_id'
- $referencedColumnName: 'product_variant_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductVariant::class
- $fetch: 'LAZY'
$vat
protected
TVat|null
$vat
= null
Attributes
- #[JoinColumn]
- $name: 'cms_system_vats_vat_id'
- $referencedColumnName: 'vat_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\Vat::class
- $fetch: 'LAZY'
$warranty
protected
int
$warranty
= 0
Attributes
- #[Column]
- $name: 'warranty'
- $type: 'integer'
- $options: ['unsigned' => true]
$weight
protected
string
$weight
= '0.000'
Attributes
- #[Column]
- $name: 'weight'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$parameterEditorKeys
private
array<string, true>
$parameterEditorKeys
= []
Runtime cache: keys of parameters with an editor (useEditor), whose value is HTML
Attributes
- #[Transient]
$parameterIndex
private
array<string, array<int, string|null>>|null
$parameterIndex
= null
Runtime cache: key => [values]
Attributes
- #[Transient]
$parameterRenderModes
private
array<string, ContentFilterMode}>
$parameterRenderModes
= []
Runtime cache: key => [urlMode, wordMode]
Attributes
- #[Transient]
$renderBlacklistedWords
private
array<string|int, string>
$renderBlacklistedWords
= []
Words for render-time replacement (disallowBlacklistedWords is OnRender); set by the presenter before rendering.
Attributes
- #[FieldAccess]
- $read: \App\Core\Attributes\Hydration\Audience::All
- $insert: \App\Core\Attributes\Hydration\Audience::Privileged
- $update: \App\Core\Attributes\Hydration\Audience::Privileged
- #[Transient]
$renderUrlsAllowed
Render-time URL replacement (`disallowUrl` is `OnRender`) is skipped; set by the presenter for a paid "Show links" tariff.
private
bool
$renderUrlsAllowed
= false
Attributes
- #[FieldAccess]
- $read: \App\Core\Attributes\Hydration\Audience::All
- $insert: \App\Core\Attributes\Hydration\Audience::Privileged
- $update: \App\Core\Attributes\Hydration\Audience::Privileged
- #[Transient]
Methods
__construct()
public
__construct([int|null $id = null ][, int $typeId = 1 ][, mixed $product = null ][, mixed $variant = null ][, string $unit = 'ks' ][, int|null $unitId = null ][, mixed $productState = null ][, mixed $vat = null ][, mixed $asset = null ][, string $code = '' ][, string|null $ean = null ][, string|null $isbn = null ][, bool $freeDelivery = false ][, bool $freePayment = false ][, DateTime $insertTime = new DateTime() ][, DateTime|null $updateTime = null ][, DateTime|null $publishTime = null ][, DateTime|null $unpublishTime = null ][, int $warranty = 0 ][, string $weight = '0.000' ][, bool $activated = true ][, bool $deleted = false ][, bool $importIncomplete = false ][, string $price = '0.0000' ][, Collection $translations = new ArrayCollection() ][, Collection $setItems = new ArrayCollection() ][, Collection $prices = new ArrayCollection() ][, Collection $assetRels = new ArrayCollection() ][, Collection $accessories = new ArrayCollection() ][, Collection $tags = new ArrayCollection() ][, Collection $fees = new ArrayCollection() ][, Collection $links = new ArrayCollection() ][, int|null $supplyKindId = null ]) : mixed
Parameters
- $id : int|null = null
- $typeId : int = 1
- $product : mixed = null
- $variant : mixed = null
- $unit : string = 'ks'
- $unitId : int|null = null
- $productState : mixed = null
- $vat : mixed = null
- $asset : mixed = null
- $code : string = ''
- $ean : string|null = null
- $isbn : string|null = null
- $freeDelivery : bool = false
- $freePayment : bool = false
- $insertTime : DateTime = new DateTime()
- $updateTime : DateTime|null = null
- $publishTime : DateTime|null = null
- $unpublishTime : DateTime|null = null
- $warranty : int = 0
- $weight : string = '0.000'
- $activated : bool = true
- $deleted : bool = false
- $importIncomplete : bool = false
- $price : string = '0.0000'
- $translations : Collection = new ArrayCollection()
- $setItems : Collection = new ArrayCollection()
- $prices : Collection = new ArrayCollection()
- $assetRels : Collection = new ArrayCollection()
- $accessories : Collection = new ArrayCollection()
- $tags : Collection = new ArrayCollection()
- $fees : Collection = new ArrayCollection()
- $links : Collection = new ArrayCollection()
- $supplyKindId : int|null = null
accessoryCollectionInit()
public
accessoryCollectionInit() : void
addAccessory()
public
addAccessory(TAccessory $accessory) : $this
Parameters
- $accessory : TAccessory
Return values
$thisaddAssetRel()
public
addAssetRel(TAssetRel $assetRel) : $this
Parameters
- $assetRel : TAssetRel
Return values
$thisaddFee()
public
addFee(TFee $fee) : $this
Parameters
- $fee : TFee
Return values
$thisaddLink()
public
addLink(TLink $link) : $this
Parameters
- $link : TLink
Return values
$thisaddParameterRel()
public
addParameterRel(TParameterRel $parameterRel) : $this
Parameters
- $parameterRel : TParameterRel
Return values
$thisaddPrice()
public
addPrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisaddSetItem()
public
addSetItem(TSetItemRel $setItem) : $this
Parameters
- $setItem : TSetItemRel
Return values
$thisaddTag()
public
addTag(TTag $tag) : $this
Parameters
- $tag : TTag
Return values
$thisaddTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thisassetRelCollectionInit()
public
assetRelCollectionInit() : void
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
clearAccessories()
public
clearAccessories() : $this
Return values
$thisclearFees()
public
clearFees() : $this
Return values
$thisclearLinks()
public
clearLinks() : $this
Return values
$thisclearParameterRels()
public
clearParameterRels() : $this
Return values
$thisclearPrices()
public
clearPrices() : $this
Return values
$thisclearSetItems()
public
clearSetItems() : $this
Return values
$thisclearTags()
public
clearTags() : $this
Return values
$thisfeeCollectionInit()
public
feeCollectionInit() : void
get()
Returns the parameter value by its key.
public
get(string $key[, string $type = 'string' ][, bool $alwaysReturnArray = false ]) : mixed
Parameters
- $key : string
-
Parameter key
- $type : string = 'string'
-
'string' | 'int' | 'float' | 'bool'
- $alwaysReturnArray : bool = false
-
returns an array even for a single value
getAccessories()
public
getAccessories() : Collection<int, TAccessory>
Return values
Collection<int, TAccessory>getActivated()
public
getActivated() : 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>getAsset()
public
getAsset() : TImage|null
Return values
TImage|nullgetAssetRels()
public
getAssetRels() : Collection<int, TAssetRel>
Return values
Collection<int, TAssetRel>getAssets()
Assets of the non-removed rels, ordered by `order` — whatever the rel's untyped `getAsset()` holds (asset entity, or null).
public
getAssets() : array<int, mixed>
Return values
array<int, mixed>getCode()
public
getCode() : string
Return values
stringgetCommentThread()
public
getCommentThread() : object|null
Return values
object|nullgetCommentThreadId()
public
getCommentThreadId() : int|null
Return values
int|nullgetDeleted()
public
getDeleted() : bool
Return values
boolgetEan()
public
getEan() : string|null
Return values
string|nullgetFees()
public
getFees() : Collection<int, TFee>
Return values
Collection<int, TFee>getFreeDelivery()
public
getFreeDelivery() : bool
Return values
boolgetFreePayment()
public
getFreePayment() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetImportIncomplete()
public
getImportIncomplete() : bool
Return values
boolgetInsertTime()
public
getInsertTime() : DateTime
Return values
DateTimegetIsbn()
public
getIsbn() : string|null
Return values
string|nullgetLinks()
public
getLinks() : Collection<int, TLink>
Return values
Collection<int, TLink>getMainAsset()
public
getMainAsset() : Asset|null
Return values
Asset|null —main image (else the first non-removed one)
getParameterRels()
public
getParameterRels() : Collection<int, TParameterRel>
Return values
Collection<int, TParameterRel>getPrice()
public
getPrice() : string
Return values
stringgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatgetPrices()
public
getPrices() : Collection<int, TPrice>
Return values
Collection<int, TPrice>getProduct()
public
getProduct() : TProduct|null
Return values
TProduct|nullgetProductState()
public
getProductState() : TProductState|null
Return values
TProductState|nullgetPublishTime()
public
getPublishTime() : DateTime|null
Return values
DateTime|nullgetRatingThread()
public
getRatingThread() : object|null
Return values
object|nullgetRatingThreadId()
public
getRatingThreadId() : int|null
Return values
int|nullgetSetItems()
public
getSetItems() : Collection<int, TSetItemRel>
Return values
Collection<int, TSetItemRel>getString()
Returns the parameter value as text (titles, meta, OG) with the content filter, like {@see get()}.
public
getString(string $key) : string
Multiple values are joined by a comma; get() would return an array for them and the string
would read "Array".
Parameters
- $key : string
Return values
stringgetSupplyKindId()
public
getSupplyKindId() : int|null
Return values
int|nullgetTagIds()
public
getTagIds() : array<int, int|null>
Return values
array<int, int|null> —ids of the attached tags (getId() is ?int)
getTags()
public
getTags() : Collection<int, TTag>
Return values
Collection<int, TTag>getTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getTypeId()
public
getTypeId() : int
Return values
intgetUnit()
public
getUnit() : string
Return values
stringgetUnitId()
public
getUnitId() : int|null
Return values
int|nullgetUnpublishTime()
public
getUnpublishTime() : DateTime|null
Return values
DateTime|nullgetUpdateTime()
public
getUpdateTime() : DateTime|null
Return values
DateTime|nullgetVariant()
public
getVariant() : TProductVariant|null
Return values
TProductVariant|nullgetVariantId()
public
getVariantId() : int|null
Return values
int|nullgetVat()
public
getVat() : TVat|null
Return values
TVat|nullgetWarranty()
public
getWarranty() : int
Return values
intgetWeight()
public
getWeight() : string
Return values
stringgetWeightAsFloat()
public
getWeightAsFloat() : float
Return values
floatisActivated()
public
isActivated() : bool
Return values
boolisDeleted()
public
isDeleted() : bool
Return values
boolisFreeDelivery()
public
isFreeDelivery() : bool
Return values
boolisFreePayment()
public
isFreePayment() : bool
Return values
boolisImportIncomplete()
public
isImportIncomplete() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boollinkCollectionInit()
public
linkCollectionInit() : void
parameterRelCollectionInit()
public
parameterRelCollectionInit() : void
priceCollectionInit()
public
priceCollectionInit() : void
removeAccessory()
public
removeAccessory(TAccessory $accessory) : $this
Parameters
- $accessory : TAccessory
Return values
$thisremoveAssetRel()
public
removeAssetRel(TAssetRel $assetRel) : $this
Parameters
- $assetRel : TAssetRel
Return values
$thisremoveFee()
public
removeFee(TFee $fee) : $this
Parameters
- $fee : TFee
Return values
$thisremoveLink()
public
removeLink(TLink $link) : $this
Parameters
- $link : TLink
Return values
$thisremoveParameterRel()
public
removeParameterRel(TParameterRel $parameterRel) : $this
Parameters
- $parameterRel : TParameterRel
Return values
$thisremovePrice()
public
removePrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisremoveSetItem()
public
removeSetItem(TSetItemRel $setItem) : $this
Parameters
- $setItem : TSetItemRel
Return values
$thisremoveTag()
public
removeTag(TTag $tag) : $this
Parameters
- $tag : TTag
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAccessories()
public
setAccessories(Collection<int, TAccessory>|array<int, TAccessory> $accessories) : $this
Parameters
- $accessories : Collection<int, TAccessory>|array<int, TAccessory>
Return values
$thissetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetAsset()
public
setAsset(TImage|null $asset) : $this
Parameters
- $asset : TImage|null
Return values
$thissetAssetRels()
IMPORTANT: the parameter type must be `Collection`, not `ArrayCollection`; the keep branch of the Api `SaveTrait` can pass a `PersistentCollection` from a managed entity, and a narrower type would throw a `TypeError` and fail the save.
public
setAssetRels(Collection<int, TAssetRel> $assetRels) : $this
Parameters
- $assetRels : Collection<int, TAssetRel>
Return values
$thissetCode()
public
setCode(string $code) : $this
Parameters
- $code : string
Return values
$thissetCommentThread()
public
setCommentThread(object|null $commentThread) : $this
Parameters
- $commentThread : object|null
Return values
$thissetDeleted()
public
setDeleted(bool $deleted) : $this
Parameters
- $deleted : bool
Return values
$thissetEan()
public
setEan(string|null $ean) : $this
Parameters
- $ean : string|null
Return values
$thissetFees()
public
setFees(Collection<int, TFee>|array<int, TFee> $fees) : $this
Parameters
- $fees : Collection<int, TFee>|array<int, TFee>
Return values
$thissetFreeDelivery()
public
setFreeDelivery(bool $freeDelivery) : $this
Parameters
- $freeDelivery : bool
Return values
$thissetFreePayment()
public
setFreePayment(bool $freePayment) : $this
Parameters
- $freePayment : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetImportIncomplete()
public
setImportIncomplete(bool $importIncomplete) : $this
Parameters
- $importIncomplete : bool
Return values
$thissetInsertTime()
public
setInsertTime(DateTime $insertTime) : $this
Parameters
- $insertTime : DateTime
Return values
$thissetIsbn()
public
setIsbn(string|null $isbn) : $this
Parameters
- $isbn : string|null
Return values
$thissetItemCollectionInit()
public
setItemCollectionInit() : void
setLinks()
public
setLinks(Collection<int, TLink>|array<int, TLink> $links) : $this
Parameters
- $links : Collection<int, TLink>|array<int, TLink>
Return values
$thissetParameterRels()
public
setParameterRels(Collection<int, TParameterRel>|array<int, TParameterRel> $parameterRels) : $this
Parameters
- $parameterRels : Collection<int, TParameterRel>|array<int, TParameterRel>
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetPrices()
public
setPrices(Collection<int, TPrice>|array<int, TPrice> $prices) : $this
Parameters
- $prices : Collection<int, TPrice>|array<int, TPrice>
Return values
$thissetProduct()
public
setProduct(TProduct|null $product) : $this
Parameters
- $product : TProduct|null
Return values
$thissetProductState()
public
setProductState(TProductState|null $productState) : $this
Parameters
- $productState : TProductState|null
Return values
$thissetPublishTime()
public
setPublishTime(DateTime|null $publishTime) : $this
Parameters
- $publishTime : DateTime|null
Return values
$thissetRatingThread()
public
setRatingThread(object|null $ratingThread) : $this
Parameters
- $ratingThread : object|null
Return values
$thissetRenderBlacklistedWords()
Sets the context for the render-time content filter: the deny-listed words in the target language.
public
setRenderBlacklistedWords(array<string|int, string> $words) : $this
Without it the word replacement (OnRender) is skipped; URL replacement does not depend on it.
Parameters
- $words : array<string|int, string>
Return values
$thissetRenderUrlsAllowed()
Lets web addresses through the render-time filter (the advert has an active "Show links" tariff, {@see \App\Core\Config\AdvertLinksConfig}). Only the `OnRender` mode is skipped: with `OnSave` the database already holds the placeholder.
public
setRenderUrlsAllowed(bool $allowed) : $this
Parameters
- $allowed : bool
Return values
$thissetSetItems()
public
setSetItems(Collection<int, TSetItemRel>|array<int, TSetItemRel> $setItems) : $this
Parameters
- $setItems : Collection<int, TSetItemRel>|array<int, TSetItemRel>
Return values
$thissetSupplyKindId()
public
setSupplyKindId(int|null $supplyKindId) : TParameterRel>
Parameters
- $supplyKindId : int|null
Return values
TParameterRel>setTags()
public
setTags(Collection<int, TTag>|array<int, TTag> $tags) : $this
Parameters
- $tags : Collection<int, TTag>|array<int, TTag>
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetTypeId()
public
setTypeId(int $typeId) : $this
Parameters
- $typeId : int
Return values
$thissetUnit()
public
setUnit(string $unit) : $this
Parameters
- $unit : string
Return values
$thissetUnitId()
public
setUnitId(int|null $unitId) : $this
Parameters
- $unitId : int|null
Return values
$thissetUnpublishTime()
public
setUnpublishTime(DateTime|null $unpublishTime) : $this
Parameters
- $unpublishTime : DateTime|null
Return values
$thissetUpdateTime()
public
setUpdateTime(DateTime|null $updateTime) : $this
Parameters
- $updateTime : DateTime|null
Return values
$thissetVariant()
public
setVariant(TProductVariant|null $variant) : $this
Parameters
- $variant : TProductVariant|null
Return values
$thissetVat()
public
setVat(TVat|null $vat) : $this
Parameters
- $vat : TVat|null
Return values
$thissetWarranty()
public
setWarranty(int $warranty) : $this
Parameters
- $warranty : int
Return values
$thissetWeight()
public
setWeight(string $weight) : $this
Parameters
- $weight : string
Return values
$thistagCollectionInit()
public
tagCollectionInit() : void
translationCollectionInit()
public
translationCollectionInit() : void
usesEditor()
Returns whether the parameter value is editor HTML (`useEditor`).
public
usesEditor(string $key) : bool
Templates choose between |noescape (the HTML is sanitized in the Api on write) and escaped
output by it. The parameter setting decides, not the presence of tags in the text.
Parameters
- $key : string
Return values
boolbuildParameterIndex()
private
buildParameterIndex() : array<string, array<int, string|null>>
Return values
array<string, array<int, string|null>>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>