CoolCMS API

ParameterRuleCondition extends ParameterRuleCondition
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_comcat_parameter_rule_conditions'
#[TableAlias]
'parameterRuleCondition'

Table of Contents

Constants

FUNCTION_AND  : mixed = 'and'
FUNCTION_OR  : mixed = 'or'

Properties

$function  : string|null
$key  : int
$parameterId  : int|null
$rule  : TRule|null
$ruleId  : int|null
$validator  : string
$valuesCollection  : Collection
$parameter  : Parameter|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.
getFunction()  : string|null
getKey()  : int
getParameter()  : Parameter|null
getParameterId()  : int|null
getRule()  : TRule|null
getRuleId()  : int|null
getValidator()  : string
getValues()  : array<int, TConditionValue>
Elements are {@see ParameterRuleConditionValueInterface}; `mixed` on purpose, see {@see ParameterRuleInterface::getConditions()} (untyped Doctrine collections + `instanceof` in Core).
getValuesCollection()  : Collection<int, TConditionValue>
setFunction()  : self
setKey()  : $this
setParameter()  : self
setParameterId()  : $this
setRule()  : $this
setRuleId()  : $this
setValidator()  : $this
setValuesCollection()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Constants

Properties

$function

protected string|null $function = null
Attributes
#[Column]
$name: 'function'
$type: 'string'
$length: 10
$nullable: true

$parameterId

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

$rule

protected TRule|null $rule = null
Attributes
#[JoinColumn]
$name: 'cms_mod_comcat_parameter_rules_parameter_rule_id'
$referencedColumnName: 'parameter_rule_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Comcat\Models\Entities\ParameterRule::class
$inversedBy: 'conditionsCollection'

$ruleId

protected int|null $ruleId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_parameter_rules_parameter_rule_id'
$type: 'bigint'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$validator

protected string $validator = ParameterRuleConditionValidator::EQUAL
Attributes
#[Column]
$name: 'validator'
$type: 'string'
$length: 15
$nullable: true

$valuesCollection

protected Collection $valuesCollection
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Comcat\Models\Entities\ParameterRuleConditionValue::class
$mappedBy: 'condition'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

$parameter

private Parameter|null $parameter = null
Attributes
#[JoinColumn]
$name: 'cms_mod_comcat_parameters_parameter_id'
$referencedColumnName: 'parameter_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Comcat\Models\Entities\Parameter::class

Methods

__construct()

public __construct([int|null $ruleId = null ][, int $key = 0 ][, int|null $parameterId = null ][, string|null $function = null ][, string $validator = ParameterRuleConditionValidator::EQUAL ][, mixed $rule = null ][, Collection $valuesCollection = new ArrayCollection() ]) : mixed
Parameters
$ruleId : int|null = null
$key : int = 0
$parameterId : int|null = null
$function : string|null = null
$validator : string = ParameterRuleConditionValidator::EQUAL
$rule : mixed = null
$valuesCollection : Collection = new ArrayCollection()

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>

getValues()

Elements are {@see ParameterRuleConditionValueInterface}; `mixed` on purpose, see {@see ParameterRuleInterface::getConditions()} (untyped Doctrine collections + `instanceof` in Core).

public getValues() : array<int, TConditionValue>
Return values
array<int, TConditionValue>

getValuesCollection()

public getValuesCollection() : Collection<int, TConditionValue>
Return values
Collection<int, TConditionValue>

setFunction()

public setFunction(string|null $function) : self
Parameters
$function : string|null
Return values
self

setParameterId()

public setParameterId(int|null $parameterId) : $this
Parameters
$parameterId : int|null
Return values
$this

setRule()

public setRule(TRule|null $rule) : $this
Parameters
$rule : TRule|null
Return values
$this

setRuleId()

public setRuleId(int|null $ruleId) : $this
Parameters
$ruleId : int|null
Return values
$this

setValidator()

public setValidator(string $validator) : $this
Parameters
$validator : string
Return values
$this

setValuesCollection()

public setValuesCollection(Collection<int, TConditionValue>|array<int, TConditionValue> $collection) : $this
Parameters
$collection : Collection<int, TConditionValue>|array<int, TConditionValue>
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