SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class DisplayConditionEnum

Display condition for enumerations - where the set of parameter values is fixed and always equals or not equals

Functions

NameVisibilityDescription
getCurrentValueprotectedReturn the current value of the variable
getOperatorspublicReturn the list of operators for the condition value
getParamTypepublicReturn the type of parameter for UI display
matchpublicDoes a given condition match?

protected getCurrentValue

string $DisplayConditionEnum->getCurrentValue ( array $env );

Return the current value of the variable
This is compared against the params returned by DisplayCondition::getParamValues

public getOperators

array $DisplayConditionEnum->getOperators ( );

Return the list of operators for the condition value
Common values would be 'equals', 'not equals', 'less than', 'contains', etc

public getParamType

string $DisplayConditionEnum->getParamType ( );

Return the type of parameter for UI display
Only two types are supported - 'text' or 'dropdown'

public match

bool $DisplayConditionEnum->match ( array $env , string $op , string $val );

Does a given condition match?

Calls DisplayConditionEnum::getCurrentValue to get the current value
And then does the comparison against $val based on $op