Given an operator, return Selector instance (or other requested Selector property)
When getting a Selector instance, be sure to populate its field
and value
properties after retrieving it.
Available since version 3.0.160.
Usage
// basic usage
$selector = Selectors::getSelectorByOperator(string $operator);
// usage with all arguments
$selector = Selectors::getSelectorByOperator(string $operator, string $property = 'instance');
Arguments
Name | Type(s) | Description |
---|---|---|
operator | string | Operator to get Selector instance for |
property (optional) | string | One of 'instance,', 'label', 'compareType', 'class', 'className' (default='instance') |
Return value
Selectors methods and properties
API reference based on ProcessWire core version 3.0.236