CoolCMS API

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
extends
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>
$availabilityAttributeClass  : string|null
$availabilityInfoText  : string|null
$availabilityText  : string|null
$availableSets  : int|null
$code  : string
$commentThread  : CommentThread|null
$currentOriginalPrice  : string|null
$currentPrice  : string|null
$currentPriceCurrencyId  : int|null
$deleted  : bool
$ean  : string|null
$fees  : Collection<int, ProductSetFee>
$freeDelivery  : bool
$freePayment  : bool
$id  : int|null
$importIncomplete  : bool
$insertTime  : DateTime
$inStockFlag  : bool
$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).
getAvailabilityAttributeClass()  : string|null
getAvailabilityInfoText()  : string|null
getAvailabilityText()  : string|null
getAvailableSets()  : int|null
getCode()  : string
getCommentThread()  : object|null
getCommentThreadId()  : int|null
getCurrentOriginalPrice()  : string|null
getCurrentPrice()  : string|null
getCurrentPriceCurrencyId()  : int|null
getDeleted()  : bool
getEan()  : string|null
getFees()  : Collection<int, TFee>
getFreeDelivery()  : bool
getFreePayment()  : bool
getId()  : int|null
getImportIncomplete()  : bool
getInsertTime()  : DateTime
getInStockFlag()  : bool
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.
setAvailabilityAttributeClass()  : self
setAvailabilityInfoText()  : self
setAvailabilityText()  : self
setAvailableSets()  : self
setCode()  : $this
setCommentThread()  : $this
setCurrentOriginalPrice()  : self
setCurrentPrice()  : self
setCurrentPriceCurrencyId()  : self
setDeleted()  : $this
setEan()  : $this
setFees()  : $this
setFreeDelivery()  : $this
setFreePayment()  : $this
setId()  : $this
setImportIncomplete()  : $this
setInsertTime()  : $this
setInStockFlag()  : self
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
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetAccessory::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductSetAccessory::class
$mappedBy: 'productSet'
$cascade: ['persist', 'remove']
$orphanRemoval: true
$fetch: 'LAZY'

$asset

protected TImage|null $asset = null

main image

Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Asset::class
#[JoinColumn]
$name: 'cms_system_images_image_id'
$referencedColumnName: 'image_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\System\Models\Entities\Asset::class
$fetch: 'LAZY'

$assetRels

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

$availabilityAttributeClass

protected string|null $availabilityAttributeClass = null
Attributes
#[Transient]

$availabilityInfoText

protected string|null $availabilityInfoText = null
Attributes
#[Transient]

$code

protected string $code = ''
Attributes
#[Column]
$name: 'code'
$type: 'string'
$length: 20

$currentOriginalPrice

protected string|null $currentOriginalPrice = null
Attributes
#[Transient]

$currentPriceCurrencyId

protected int|null $currentPriceCurrencyId = null
Attributes
#[Transient]

$ean

protected string|null $ean = null
Attributes
#[Column]
$name: 'ean'
$type: 'string'
$length: 45
$nullable: true

$fees

protected Collection<int, ProductSetFee> $fees
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetFee::class
#[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\Admin\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'
#[ExternalReadonly]

$isbn

protected string|null $isbn = null
Attributes
#[Column]
$name: 'isbn'
$type: 'string'
$length: 45
$nullable: true
protected Collection<int, ProductSetLink> $links
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetLink::class
#[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\Admin\Eshop\Models\Entities\ProductSetLink::class
$fetch: 'LAZY'

$parameterRels

protected Collection<int, ProductSetParameterRel> $parameterRels
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetParameterRel::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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]
#[ExternalReadonly]

$prices

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

$product

protected TProduct|null $product = null
Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\Product::class
#[JoinColumn]
$name: 'cms_mod_eshop_products_product_id'
$referencedColumnName: 'product_id'
$nullable: true
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\Product::class
$fetch: 'LAZY'

$productState

protected TProductState|null $productState = null
Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ProductState::class
#[JoinColumn]
$name: 'cms_mod_eshop_product_states_product_state_id'
$referencedColumnName: 'product_state_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductState::class
$fetch: 'LAZY'

$publishTime

protected DateTime|null $publishTime = null
Attributes
#[Column]
$name: 'publish_time'
$type: 'datetime'
$nullable: true

$setItems

protected Collection<int, SetItemRel> $setItems
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\SetItemRel::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductTag::class
#[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\Admin\Eshop\Models\Entities\ProductTag::class
$fetch: 'LAZY'

$translations

protected Collection<int, ProductSetText> $translations
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductSetText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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
#[ExternalReadonly]

$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
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ProductVariant::class
#[JoinColumn]
$name: 'cms_mod_eshop_product_variants_product_variant_id'
$referencedColumnName: 'product_variant_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductVariant::class
$fetch: 'LAZY'

$vat

protected TVat|null $vat = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Vat::class
#[JoinColumn]
$name: 'cms_system_vats_vat_id'
$referencedColumnName: 'vat_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\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]

$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

addAccessory()

public addAccessory(TAccessory $accessory) : $this
Parameters
$accessory : TAccessory
Return values
$this

addAssetRel()

public addAssetRel(TAssetRel $assetRel) : $this
Parameters
$assetRel : TAssetRel
Return values
$this

addFee()

public addFee(TFee $fee) : $this
Parameters
$fee : TFee
Return values
$this
public addLink(TLink $link) : $this
Parameters
$link : TLink
Return values
$this

addParameterRel()

public addParameterRel(TParameterRel $parameterRel) : $this
Parameters
$parameterRel : TParameterRel
Return values
$this

addPrice()

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

addSetItem()

public addSetItem(TSetItemRel $setItem) : $this
Parameters
$setItem : TSetItemRel
Return values
$this

addTag()

public addTag(TTag $tag) : $this
Parameters
$tag : TTag
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

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
bool

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>

getAsset()

public getAsset() : TImage|null
Return values
TImage|null

getAssetRels()

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>

getAvailabilityAttributeClass()

public getAvailabilityAttributeClass() : string|null
Return values
string|null

getAvailabilityInfoText()

public getAvailabilityInfoText() : string|null
Return values
string|null

getAvailabilityText()

public getAvailabilityText() : string|null
Return values
string|null

getAvailableSets()

public getAvailableSets() : int|null
Return values
int|null

getCode()

public getCode() : string
Return values
string

getCommentThread()

public getCommentThread() : object|null
Return values
object|null

getCommentThreadId()

public getCommentThreadId() : int|null
Return values
int|null

getCurrentOriginalPrice()

public getCurrentOriginalPrice() : string|null
Return values
string|null

getCurrentPrice()

public getCurrentPrice() : string|null
Return values
string|null

getCurrentPriceCurrencyId()

public getCurrentPriceCurrencyId() : int|null
Return values
int|null

getDeleted()

public getDeleted() : bool
Return values
bool

getEan()

public getEan() : string|null
Return values
string|null

getFees()

public getFees() : Collection<int, TFee>
Return values
Collection<int, TFee>

getFreeDelivery()

public getFreeDelivery() : bool
Return values
bool

getFreePayment()

public getFreePayment() : bool
Return values
bool

getImportIncomplete()

public getImportIncomplete() : bool
Return values
bool

getInsertTime()

public getInsertTime() : DateTime
Return values
DateTime

getInStockFlag()

public getInStockFlag() : bool
Return values
bool

getIsbn()

public getIsbn() : string|null
Return values
string|null
public getLinks() : Collection<int, TLink>
Return values
Collection<int, TLink>

getParameterRels()

public getParameterRels() : Collection<int, TParameterRel>
Return values
Collection<int, TParameterRel>

getPrice()

public getPrice() : string
Return values
string

getPriceAsFloat()

public getPriceAsFloat() : float
Return values
float

getPrices()

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

getProduct()

public getProduct() : TProduct|null
Return values
TProduct|null

getProductState()

public getProductState() : TProductState|null
Return values
TProductState|null

getPublishTime()

public getPublishTime() : DateTime|null
Return values
DateTime|null

getRatingThread()

public getRatingThread() : object|null
Return values
object|null

getRatingThreadId()

public getRatingThreadId() : int|null
Return values
int|null

getSetItems()

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
string

getSupplyKindId()

public getSupplyKindId() : int|null
Return values
int|null

getTagIds()

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|null

getTranslations()

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

getTypeId()

public getTypeId() : int
Return values
int

getUnit()

public getUnit() : string
Return values
string

getUnitId()

public getUnitId() : int|null
Return values
int|null

getUnpublishTime()

public getUnpublishTime() : DateTime|null
Return values
DateTime|null

getUpdateTime()

public getUpdateTime() : DateTime|null
Return values
DateTime|null

getVariant()

public getVariant() : TProductVariant|null
Return values
TProductVariant|null

getVariantId()

public getVariantId() : int|null
Return values
int|null

getVat()

public getVat() : TVat|null
Return values
TVat|null

getWarranty()

public getWarranty() : int
Return values
int

getWeight()

public getWeight() : string
Return values
string

getWeightAsFloat()

public getWeightAsFloat() : float
Return values
float

isActivated()

public isActivated() : bool
Return values
bool

isDeleted()

public isDeleted() : bool
Return values
bool

isFreeDelivery()

public isFreeDelivery() : bool
Return values
bool

isFreePayment()

public isFreePayment() : bool
Return values
bool

isImportIncomplete()

public isImportIncomplete() : bool
Return values
bool

removeAccessory()

public removeAccessory(TAccessory $accessory) : $this
Parameters
$accessory : TAccessory
Return values
$this

removeAssetRel()

public removeAssetRel(TAssetRel $assetRel) : $this
Parameters
$assetRel : TAssetRel
Return values
$this

removeFee()

public removeFee(TFee $fee) : $this
Parameters
$fee : TFee
Return values
$this
public removeLink(TLink $link) : $this
Parameters
$link : TLink
Return values
$this

removeParameterRel()

public removeParameterRel(TParameterRel $parameterRel) : $this
Parameters
$parameterRel : TParameterRel
Return values
$this

removePrice()

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

removeSetItem()

public removeSetItem(TSetItemRel $setItem) : $this
Parameters
$setItem : TSetItemRel
Return values
$this

removeTag()

public removeTag(TTag $tag) : $this
Parameters
$tag : TTag
Return values
$this

removeTranslation()

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

setAccessories()

public setAccessories(Collection<int, TAccessory>|array<int, TAccessory> $accessories) : $this
Parameters
$accessories : Collection<int, TAccessory>|array<int, TAccessory>
Return values
$this

setActivated()

public setActivated(bool $activated) : $this
Parameters
$activated : bool
Return values
$this

setAsset()

public setAsset(TImage|null $asset) : $this
Parameters
$asset : TImage|null
Return values
$this

setAssetRels()

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
$this

setAvailabilityAttributeClass()

public setAvailabilityAttributeClass(string|null $availabilityAttributeClass) : self
Parameters
$availabilityAttributeClass : string|null
Return values
self

setAvailabilityInfoText()

public setAvailabilityInfoText(string|null $availabilityInfoText) : self
Parameters
$availabilityInfoText : string|null
Return values
self

setAvailabilityText()

public setAvailabilityText(string|null $availabilityText) : self
Parameters
$availabilityText : string|null
Return values
self

setAvailableSets()

public setAvailableSets(int|null $availableSets) : self
Parameters
$availableSets : int|null
Return values
self

setCode()

public setCode(string $code) : $this
Parameters
$code : string
Return values
$this

setCommentThread()

public setCommentThread(object|null $commentThread) : $this
Parameters
$commentThread : object|null
Return values
$this

setCurrentOriginalPrice()

public setCurrentOriginalPrice(string|null $currentOriginalPrice) : self
Parameters
$currentOriginalPrice : string|null
Return values
self

setCurrentPrice()

public setCurrentPrice(string|null $currentPrice) : self
Parameters
$currentPrice : string|null
Return values
self

setCurrentPriceCurrencyId()

public setCurrentPriceCurrencyId(int|null $currentPriceCurrencyId) : self
Parameters
$currentPriceCurrencyId : int|null
Return values
self

setDeleted()

public setDeleted(bool $deleted) : $this
Parameters
$deleted : bool
Return values
$this

setEan()

public setEan(string|null $ean) : $this
Parameters
$ean : string|null
Return values
$this

setFees()

public setFees(Collection<int, TFee>|array<int, TFee> $fees) : $this
Parameters
$fees : Collection<int, TFee>|array<int, TFee>
Return values
$this

setFreeDelivery()

public setFreeDelivery(bool $freeDelivery) : $this
Parameters
$freeDelivery : bool
Return values
$this

setFreePayment()

public setFreePayment(bool $freePayment) : $this
Parameters
$freePayment : bool
Return values
$this

setId()

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

setImportIncomplete()

public setImportIncomplete(bool $importIncomplete) : $this
Parameters
$importIncomplete : bool
Return values
$this

setInsertTime()

public setInsertTime(DateTime $insertTime) : $this
Parameters
$insertTime : DateTime
Return values
$this

setInStockFlag()

public setInStockFlag(bool $inStockFlag) : self
Parameters
$inStockFlag : bool
Return values
self

setIsbn()

public setIsbn(string|null $isbn) : $this
Parameters
$isbn : string|null
Return values
$this
public setLinks(Collection<int, TLink>|array<int, TLink> $links) : $this
Parameters
$links : Collection<int, TLink>|array<int, TLink>
Return values
$this

setParameterRels()

public setParameterRels(Collection<int, TParameterRel>|array<int, TParameterRel> $parameterRels) : $this
Parameters
$parameterRels : Collection<int, TParameterRel>|array<int, TParameterRel>
Return values
$this

setPrice()

public setPrice(string $price) : $this
Parameters
$price : string
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

setProduct()

public setProduct(TProduct|null $product) : $this
Parameters
$product : TProduct|null
Return values
$this

setProductState()

public setProductState(TProductState|null $productState) : $this
Parameters
$productState : TProductState|null
Return values
$this

setPublishTime()

public setPublishTime(DateTime|null $publishTime) : $this
Parameters
$publishTime : DateTime|null
Return values
$this

setRatingThread()

public setRatingThread(object|null $ratingThread) : $this
Parameters
$ratingThread : object|null
Return values
$this

setRenderBlacklistedWords()

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
$this

setRenderUrlsAllowed()

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
$this

setSetItems()

public setSetItems(Collection<int, TSetItemRel>|array<int, TSetItemRel> $setItems) : $this
Parameters
$setItems : Collection<int, TSetItemRel>|array<int, TSetItemRel>
Return values
$this

setSupplyKindId()

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
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$this

setTypeId()

public setTypeId(int $typeId) : $this
Parameters
$typeId : int
Return values
$this

setUnit()

public setUnit(string $unit) : $this
Parameters
$unit : string
Return values
$this

setUnitId()

public setUnitId(int|null $unitId) : $this
Parameters
$unitId : int|null
Return values
$this

setUnpublishTime()

public setUnpublishTime(DateTime|null $unpublishTime) : $this
Parameters
$unpublishTime : DateTime|null
Return values
$this

setUpdateTime()

public setUpdateTime(DateTime|null $updateTime) : $this
Parameters
$updateTime : DateTime|null
Return values
$this

setVariant()

public setVariant(TProductVariant|null $variant) : $this
Parameters
$variant : TProductVariant|null
Return values
$this

setVat()

public setVat(TVat|null $vat) : $this
Parameters
$vat : TVat|null
Return values
$this

setWarranty()

public setWarranty(int $warranty) : $this
Parameters
$warranty : int
Return values
$this

setWeight()

public setWeight(string $weight) : $this
Parameters
$weight : string
Return values
$this

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
bool

buildParameterIndex()

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>
Return values
array<string, string>
On this page

Search results