SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class BrowserVersion

Display condition for browser version - 3, 4, 5, etc
Test is integerised, so therefore only checks the major number
Only makes sense when a conditon for the browser itself is also selected

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
getParamValuespublicReturn the available values for dropdowns
matchpublicDoes a given condition match?

protected getCurrentValue

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

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

public getOperators (from DisplayConditionInteger)

array $DisplayConditionInteger->getOperators ( );

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

public getParamType (from DisplayConditionInteger)

string $DisplayConditionInteger->getParamType ( );

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

public getParamValues (from DisplayCondition)

array $DisplayCondition->getParamValues ( );

Return the available values for dropdowns

public match (from DisplayConditionInteger)

bool $DisplayConditionInteger->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