CoolCMS API

AdminParameterRuleInterface extends ParameterRuleInterface

Admin view of a parameter rule: conditions carry hydrated relations to the parameter and option (the shared interface knows only ids). The Admin `ParameterRule` entities of all modules implement it, so the Core admin layer (rule list, OptionRules) is not typed to module entities.

Table of Contents

Constants

ACTION_HIDE  : mixed = 2
ACTION_SHOW_SELECT_OPTIONS  : mixed = 1
`action` values, common to all modules (see {@see self::getAction()}).

Methods

getAction()  : int
Legacy flag (1 reveals options, 2 hides them); it no longer decides the effect, see the class comment.
getConditions()  : array<int|string, mixed>
Elements are {@see ParameterRuleConditionInterface}. The type is `mixed` on purpose: module entities keep conditions in an untyped Doctrine `Collection`, so a stronger promise would be false. Only the `instanceof` guard in Core (`RulesTrait`/`DependentSelectTrait`) enforces it, so it must stay.
getConditionsCollection()  : Collection<int, AdminParameterRuleConditionInterface>
getId()  : int|null
getTargets()  : array<int|string, mixed>
Elements are {@see ParameterRuleTargetInterface}; for why `mixed`, see {@see self::getConditions()}.
getTargetsCollection()  : Collection<int, ParameterRuleTargetInterface>

Constants

ACTION_SHOW_SELECT_OPTIONS

`action` values, common to all modules (see {@see self::getAction()}).

public mixed ACTION_SHOW_SELECT_OPTIONS = 1

Methods

getAction()

Legacy flag (1 reveals options, 2 hides them); it no longer decides the effect, see the class comment.

public getAction() : int
Return values
int

getConditions()

Elements are {@see ParameterRuleConditionInterface}. The type is `mixed` on purpose: module entities keep conditions in an untyped Doctrine `Collection`, so a stronger promise would be false. Only the `instanceof` guard in Core (`RulesTrait`/`DependentSelectTrait`) enforces it, so it must stay.

public getConditions() : array<int|string, mixed>
Return values
array<int|string, mixed>

getTargets()

Elements are {@see ParameterRuleTargetInterface}; for why `mixed`, see {@see self::getConditions()}.

public getTargets() : array<int|string, mixed>
Return values
array<int|string, mixed>
On this page

Search results