CoolCMS API

ParameterRuleCondition extends BaseEntity
in package
implements ParameterRuleConditionInterface

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

Table of Contents

Interfaces

ParameterRuleConditionInterface
Single rule condition: "parameter X satisfies validator V over values Y".

Constants

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

Properties

$function  : string|null
$key  : int
$parameterId  : int|null
$rule  : TRule
$ruleId  : int|null
$validator  : string
$valuesCollection  : Collection<int, TConditionValue>

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
getParameterId()  : int|null
getRule()  : TRule|null
getRuleId()  : int|null
getValidator()  : string
getValues()  : array<int|string, mixed>
Elements are {@see ParameterRuleConditionValueInterface}; `mixed` on purpose, see {@see ParameterRuleInterface::getConditions()} (untyped Doctrine collections + `instanceof` in Core).
getValuesCollection()  : Collection<int, TConditionValue>
setFunction()  : $this
setKey()  : $this
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_eshop_parameters_parameter_id'
$type: 'integer'
$nullable: true
$insertable: false
$updatable: false
$options: ['unsigned' => true]

$ruleId

protected int|null $ruleId = null
Attributes
#[Column]
$name: 'cms_mod_eshop_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<int, TConditionValue> $valuesCollection = new ArrayCollection()

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|string, mixed>
Return values
array<int|string, mixed>

getValuesCollection()

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

setFunction()

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

setParameterId()

public setParameterId(int|null $parameterId) : $this
Parameters
$parameterId : int|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