CoolCMS API

ParameterRuleSource extends BaseEntity
in package

AbstractYes

Source of a parameter rule, with a derived identity: the PK is the `[rule, parameter]` association pair (mapped in the leaf class).

The scalars ruleId/parameterId are read-only mirrors of the same columns, mapped for filters (EqualFilter); only the associations write. There are no setRuleId()/setParameterId() setters on purpose, so the two cannot get out of sync.

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

Table of Contents

Properties

$parameter  : TParameter|null
$parameterId  : int|null
$rule  : TRule|null
$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

$parameterId

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

$ruleId

protected int|null $ruleId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_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|null $parameter) : $this
Parameters
$parameter : TParameter|null
Return values
$this

setRule()

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