CategoryParameterRel
extends CategoryParameterRel
in package
Link between an eshop category and a parameter (`cms_mod_eshop_category_parameter_rel`), composite PK (category + parameter); a port of the Bazaar triple ({@see \App\Core\Base\Shared\Bazaar\Models\Entities\CategoryParameterRel}).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_category_parameter_rel'
- #[TableAlias]
- 'categoryParameterRel'
Table of Contents
Properties
- $category : TCategory|null
- $categoryId : int|null
- $order : int
- $parameterGroupId : int|null
- $parameterId : int|null
- $required : bool
- $useInSearch : bool
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.
- getCategory() : TCategory|null
- getCategoryId() : int|null
- getOrder() : int
- getParameterGroupId() : int|null
- getParameterId() : int|null
- getRequired() : bool
- getUseInSearch() : bool
- isRequired() : bool
- isUseInSearch() : bool
- setCategory() : $this
- setCategoryId() : $this
- setOrder() : $this
- setParameterGroupId() : $this
- setParameterId() : $this
- setRequired() : $this
- setUseInSearch() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$category
protected
TCategory|null
$category
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_product_categories_category_id'
- $referencedColumnName: 'category_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ProductCategory::class
- $inversedBy: 'parameterRels'
- $fetch: 'LAZY'
$categoryId
protected
int|null
$categoryId
= null
Attributes
- #[Column]
- $name: 'cms_mod_eshop_product_categories_category_id'
- $type: 'integer'
- $insertable: false
- $updatable: false
- $nullable: true
- $options: ['unsigned' => true]
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
$parameterGroupId
protected
int|null
$parameterGroupId
= null
Attributes
- #[Column]
- $name: 'cms_mod_eshop_parameter_groups_parameter_group_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$parameterId
protected
int|null
$parameterId
= null
Attributes
- #[Column]
- $name: 'cms_mod_eshop_parameters_parameter_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$required
protected
bool
$required
= false
Attributes
- #[Column]
- $name: 'required'
- $type: 'boolean'
$useInSearch
protected
bool
$useInSearch
= false
Attributes
- #[Column]
- $name: 'use_in_search'
- $type: 'boolean'
Methods
__construct()
public
__construct([mixed $category = null ][, int|null $categoryId = null ][, int|null $parameterId = null ][, int $order = 0 ][, bool $required = false ][, bool $useInSearch = false ][, int|null $parameterGroupId = null ]) : mixed
Parameters
- $category : mixed = null
- $categoryId : int|null = null
- $parameterId : int|null = null
- $order : int = 0
- $required : bool = false
- $useInSearch : bool = false
- $parameterGroupId : int|null = null
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>getCategory()
public
getCategory() : TCategory|null
Return values
TCategory|nullgetCategoryId()
public
getCategoryId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : int
Return values
intgetParameterGroupId()
public
getParameterGroupId() : int|null
Return values
int|nullgetParameterId()
public
getParameterId() : int|null
Return values
int|nullgetRequired()
public
getRequired() : bool
Return values
boolgetUseInSearch()
public
getUseInSearch() : bool
Return values
boolisRequired()
public
isRequired() : bool
Return values
boolisUseInSearch()
public
isUseInSearch() : bool
Return values
boolsetCategory()
public
setCategory(TCategory|null $category) : $this
Parameters
- $category : TCategory|null
Return values
$thissetCategoryId()
public
setCategoryId(int|null $categoryId) : $this
Parameters
- $categoryId : int|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetParameterGroupId()
public
setParameterGroupId(int|null $parameterGroupId) : $this
Parameters
- $parameterGroupId : int|null
Return values
$thissetParameterId()
public
setParameterId(int|null $parameterId) : $this
Parameters
- $parameterId : int|null
Return values
$thissetRequired()
public
setRequired(bool $required) : $this
Parameters
- $required : bool
Return values
$thissetUseInSearch()
public
setUseInSearch(bool $useInSearch) : $this
Parameters
- $useInSearch : bool
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>