CoolCMS API

SetItemRel extends SetItemRel
in package

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

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_set_item_relations'
#[TableAlias]
'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
Attributes
#[EntityOf]
\App\UI\Front\Eshop\Models\Entities\ProductSet::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_eshop_product_sets_product_set_id1'
$referencedColumnName: 'product_set_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\Eshop\Models\Entities\ProductSet::class

$count

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

$productSet

protected TParentSet|null $productSet = null
Attributes
#[EntityOf]
\App\UI\Front\Eshop\Models\Entities\ProductSet::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_eshop_product_sets_product_set_id'
$referencedColumnName: 'product_set_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\Eshop\Models\Entities\ProductSet::class
$inversedBy: 'setItems'

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