public function TextFieldHandler::getOperators in CRM Core 8
Same name and namespace in other branches
- 8.3 modules/crm_core_match/src/Plugin/crm_core_match/field/TextFieldHandler.php \Drupal\crm_core_match\Plugin\crm_core_match\field\TextFieldHandler::getOperators()
- 8.2 modules/crm_core_match/src/Plugin/crm_core_match/field/TextFieldHandler.php \Drupal\crm_core_match\Plugin\crm_core_match\field\TextFieldHandler::getOperators()
Gets the operators.
Defines the logical operators that can be used by this field type. Provides any additional fields needed to capture information used in logical evaluations. See {@code QueryInterface::condition} for valid operators.
For instance: if this was a text field, there might be 4 logical operators: =, STARTS_WITH, ENDS_WITH and CONTAINS.
Parameters
string $property: The name of the property.
Return value
string[] Array of operators, with the operator name as key and the translated operator label as value.
Overrides FieldHandlerInterface::getOperators
File
- modules/
crm_core_match/ src/ Plugin/ crm_core_match/ field/ TextFieldHandler.php, line 17
Class
- TextFieldHandler
- Class for evaluating text fields.
Namespace
Drupal\crm_core_match\Plugin\crm_core_match\fieldCode
public function getOperators($property = 'value') {
return [
'=' => t('Equals'),
'STARTS_WITH' => t('Starts with'),
'ENDS_WITH' => t('Ends with'),
'CONTAINS' => t('Contains'),
];
}