CoolCMS API

SetItemRel extends BaseEntity
in package

AbstractYes

Set composition item: a parent set (`type_id = 2`) contains another set with a quantity.

Owned FK in the PK (composite parent + child); the concrete #[ORM\Id] and many-to-one on both sides come from the Api/Admin leaf (like ProductSetAccessory, also a ProductSet self-reference).

The sellable entity is always ProductSet, so a set is composed of sets, including finished bundles (recursively; see SetCompositionService). The link to the physical variant is ProductSet::$variant on type_id = 1 (unique).

Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'setItemRel'

Table of Contents

Properties

$childSet  : TChildSet|null
$count  : int
$productSet  : TParentSet|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getChildSet()  : TChildSet|null
getCount()  : int
getProductSet()  : TParentSet|null
setChildSet()  : $this
setCount()  : $this
setProductSet()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$childSet

protected TChildSet|null $childSet = null

$count

protected int $count = 1
Attributes
#[Column]
$name: 'count'
$type: 'integer'
$options: ['unsigned' => true]

$productSet

protected TParentSet|null $productSet = null

Methods

__construct()

public __construct([mixed $productSet = null ][, mixed $childSet = null ][, int $count = 1 ]) : mixed
Parameters
$productSet : mixed = null
$childSet : mixed = null
$count : int = 1

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>

getChildSet()

public getChildSet() : TChildSet|null
Return values
TChildSet|null

getCount()

public getCount() : int
Return values
int

getProductSet()

public getProductSet() : TParentSet|null
Return values
TParentSet|null

setChildSet()

public setChildSet(TChildSet|null $childSet) : $this
Parameters
$childSet : TChildSet|null
Return values
$this

setCount()

public setCount(int $count) : $this
Parameters
$count : int
Return values
$this

setProductSet()

public setProductSet(TParentSet|null $productSet) : $this
Parameters
$productSet : TParentSet|null
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