Selectors::getOperators()

Get all operators allowed by selectors

Available since version 3.0.154.

Usage

// basic usage
$array = Selectors::getOperators();

// usage with all arguments
$array = Selectors::getOperators(array $options = []);

Arguments

NameType(s)Description
$options (optional)array
  • operator (string): Return info for only this operator. When specified, only value is returned Default:''
  • compareType (int): Return only operators matching given Selector::compareType* constant Default:0
  • getIndexType (string): Index type to use in returned array: 'operator', 'className', 'class', or 'none' Default:'class'
  • getValueType (string): Value type to use in returned array: 'operator', 'class', 'className', 'label', 'description', 'compareType', 'verbose' Default:'operator' If 'verbose' option used then assoc array returned for each operator containing 'class', 'className', 'operator', 'compareType', 'label', 'description'.

Return value

array string int

Returned array where values are operators and keys are class names (or requested 'getIndexType or 'getValueType' options) If 'operator' option specified, return value is string, int or array (of requested 'getValueType'), and there is no index.


Selectors methods and properties

API reference based on ProcessWire core version 3.0.252