SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class DisplayCondition

Base class for display conditions

This is known as the Context Engine, and is a set of display rules which affect
which widgets (content blocks) are shown or hidden on the page

Functions

NameVisibilityDescription
getOperatorspublicReturn the list of operators for the condition value
getParamTypepublicReturn the type of parameter for UI display
getParamValuespublicReturn the available values for dropdowns
matchpublicDoes a given condition match?

public getOperators

array $DisplayCondition->getOperators ( );

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

public getParamType

string $DisplayCondition->getParamType ( );

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

public getParamValues

array $DisplayCondition->getParamValues ( );

Return the available values for dropdowns

public match

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

Does a given condition match?