Selectors::getOperators() method

Get all operators allowed by selectors

Available since version 3.0.154.


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

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


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 both keys and values are operators (or values are requested 'valueType' option) If 'operator' option specified, return value is string, int or array (requested 'valueType'), and there is no indexType.

Selectors methods and properties

API reference based on ProcessWire core version 3.0.185

Twitter updates

  • ProcessWire 3.0.192 (dev branch) contains 11 issue fixes and 5 pull requests, over 20 commits— More
    7 January 2022
  • ProcessWire 3.0.191 core updates: updates to the installer and the profile exporter module— More
    24 December 2021
  • This week ProcessWire went on a diet, trimming the core size from 15.5 MB down to 7.5 MB by moving optional site profiles into their own GitHub repos— More
    17 December 2021

Latest news

  • ProcessWire Weekly #401
    In the 401st issue of ProcessWire Weekly we'll cover the latest core updates, check out a brand new module called Lister Native Date Format, and more. Read on! / 15 January 2022
  • ProcessWire 3.0.190 core updates
    ProcessWire 3.0.190 has 15 commits relative to 3.0.189 and contains a mixture of issue resolutions and feature additions. This post covers them all, in addition to updates for the PageAutosave and ProFields Table modules.
    Blog / 3 December 2021
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer