ParameterRuleCondition
extends ParameterRuleCondition
in package
Tags
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
FUNCTION_AND
public
mixed
FUNCTION_AND
= 'and'
FUNCTION_OR
public
mixed
FUNCTION_OR
= 'or'
Properties
$function
protected
string|null
$function
= null
Attributes
- #[Column]
- $name: 'function'
- $type: 'string'
- $length: 10
- $nullable: true
$key
protected
int
$key
= 0
Attributes
- #[Column]
- $name: '`key`'
- $type: 'integer'
- #[Id]
- #[Identity]
$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
- #[EntityOf]
- \App\UI\Front\Comcat\Models\Entities\ParameterRule::class
- #[JoinColumn]
- $name: 'cms_mod_comcat_parameter_rules_parameter_rule_id'
- $referencedColumnName: 'parameter_rule_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\Comcat\Models\Entities\ParameterRule::class
- $inversedBy: 'conditionsCollection'
- #[ParentRef]
$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
- #[CollectionOf]
- \App\UI\Front\Comcat\Models\Entities\ParameterRuleConditionValue::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Front\Comcat\Models\Entities\ParameterRuleConditionValue::class
- $mappedBy: 'condition'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$parameter
private
Parameter|null
$parameter
= null
Attributes
- #[EntityOf]
- \App\UI\Front\Comcat\Models\Entities\Parameter::class
- #[JoinColumn]
- $name: 'cms_mod_comcat_parameters_parameter_id'
- $referencedColumnName: 'parameter_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\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>getFunction()
public
getFunction() : string|null
Return values
string|nullgetKey()
public
getKey() : int
Return values
intgetParameter()
public
getParameter() : Parameter|null
Return values
Parameter|nullgetParameterId()
public
getParameterId() : int|null
Return values
int|nullgetRule()
public
getRule() : TRule|null
Return values
TRule|nullgetRuleId()
public
getRuleId() : int|null
Return values
int|nullgetValidator()
public
getValidator() : string
Return values
stringgetValues()
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
selfsetKey()
public
setKey(int $key) : $this
Parameters
- $key : int
Return values
$thissetParameter()
public
setParameter(Parameter|null $parameter) : self
Parameters
- $parameter : Parameter|null
Return values
selfsetParameterId()
public
setParameterId(int|null $parameterId) : $this
Parameters
- $parameterId : int|null
Return values
$thissetRule()
public
setRule(TRule|null $rule) : $this
Parameters
- $rule : TRule|null
Return values
$thissetRuleId()
public
setRuleId(int|null $ruleId) : $this
Parameters
- $ruleId : int|null
Return values
$thissetValidator()
public
setValidator(string $validator) : $this
Parameters
- $validator : string
Return values
$thissetValuesCollection()
public
setValuesCollection(Collection<int, TConditionValue>|array<int, TConditionValue> $collection) : $this
Parameters
- $collection : Collection<int, TConditionValue>|array<int, TConditionValue>
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>