UtmMedium
extends DisplayConditionString
in package
Display condtion for the 'utm_medium' field
Table of Contents
Methods
- getOperators() : array<string|int, mixed>
- Return the list of operators for the condition value Common values would be 'equals', 'not equals', 'less than', 'contains', etc
- getParamType() : string
- Return the type of parameter for UI display Only two types are supported - 'text' or 'dropdown'
- getParamValues() : array<string|int, mixed>
- Return the available values for dropdowns
- match() : bool
- Does a given condition match?
- getCurrentValue() : string
- Return the current value of the variable
Methods
getOperators()
Return the list of operators for the condition value Common values would be 'equals', 'not equals', 'less than', 'contains', etc
public
getOperators() : array<string|int, mixed>
Return values
array<string|int, mixed> —Key is internal value (e.g. '=') and value is the label (e.g. 'Equals')
getParamType()
Return the type of parameter for UI display Only two types are supported - 'text' or 'dropdown'
public
getParamType() : string
Return values
stringgetParamValues()
Return the available values for dropdowns
public
getParamValues() : array<string|int, mixed>
Return values
array<string|int, mixed> —Key is internal value (e.g. 'desktop') and value is the label (e.g. 'Desktop')
match()
Does a given condition match?
public
match(array<string|int, mixed> $env, string $op, string $val) : bool
Calls DisplayConditionEnum::getCurrentValue to get the current value And then does the comparison against $val based on $op
Parameters
- $env : array<string|int, mixed>
-
Environment, such as page id etc
- $op : string
-
string One of the keys from the array returned by DisplayCondition::getOperators
- $val : string
-
string Entered value OR one of the keys from DisplayCondition::getParamValues
Return values
bool —True of condition matches, false if it does not
getCurrentValue()
Return the current value of the variable
protected
getCurrentValue(array<string|int, mixed> $env) : string
Parameters
- $env : array<string|int, mixed>
-
Environment, such as page id etc