CoolCMS API

ParameterRuleSource extends ParameterRuleSource
in package

Derived identity: PK = association [rule, parameter] (mapped in the leaf). The scalars `ruleId` and `parameterId` are read-only mirrors of the same columns, mapped for filters (`EqualFilter('ruleId'/'parameterId')`); writes belong solely to the associations (`insertable`/`updatable` false). There is no `setRuleId()`/`setParameterId()`, so they cannot desync.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_parameter_rule_sources'
#[TableAlias]
'parameterRuleSource'

Table of Contents

Properties

$parameter  : TParameter
$parameterId  : int|null
$rule  : TRule
$ruleId  : int|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.
getParameter()  : TParameter|null
getParameterId()  : int|null
getRule()  : TRule|null
getRuleId()  : int|null
setParameter()  : $this
setRule()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$parameter

protected TParameter $parameter = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_mod_eshop_parameters_parameter_id'
$referencedColumnName: 'parameter_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Eshop\Models\Entities\Parameter::class

$parameterId

protected int|null $parameterId = null
Attributes
#[Column]
$name: 'cms_mod_eshop_parameters_parameter_id'
$type: 'integer'
$insertable: false
$updatable: false
$options: ['unsigned' => true]

$rule

protected TRule $rule = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_mod_eshop_parameter_rules_parameter_rule_id'
$referencedColumnName: 'parameter_rule_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Eshop\Models\Entities\ParameterRule::class
$inversedBy: 'sourcesCollection'

$ruleId

protected int|null $ruleId = null
Attributes
#[Column]
$name: 'cms_mod_eshop_parameter_rules_parameter_rule_id'
$type: 'bigint'
$insertable: false
$updatable: false
$options: ['unsigned' => true]

Methods

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>

getParameter()

public getParameter() : TParameter|null
Return values
TParameter|null

setParameter()

public setParameter(TParameter $parameter) : $this
Parameters
$parameter : TParameter
Return values
$this

setRule()

public setRule(TRule $rule) : $this
Parameters
$rule : TRule
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