SetItemRel
extends SetItemRel
in package
Set composition item: a parent set (`type_id = 2`) contains another set with a quantity.
Tags
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
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_sets_product_set_id1'
- $referencedColumnName: 'product_set_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\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
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_sets_product_set_id'
- $referencedColumnName: 'product_set_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\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|nullgetCount()
public
getCount() : int
Return values
intgetProductSet()
public
getProductSet() : TParentSet|null
Return values
TParentSet|nullsetChildSet()
public
setChildSet(TChildSet|null $childSet) : $this
Parameters
- $childSet : TChildSet|null
Return values
$thissetCount()
public
setCount(int $count) : $this
Parameters
- $count : int
Return values
$thissetProductSet()
public
setProductSet(TParentSet|null $productSet) : $this
Parameters
- $productSet : TParentSet|null
Return values
$thisgetTraitsRecursive()
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>