public function DateFieldHandler::getOperators in CRM Core 8
Same name and namespace in other branches
- 8.3 modules/crm_core_match/src/Plugin/crm_core_match/field/DateFieldHandler.php \Drupal\crm_core_match\Plugin\crm_core_match\field\DateFieldHandler::getOperators()
- 8.2 modules/crm_core_match/src/Plugin/crm_core_match/field/DateFieldHandler.php \Drupal\crm_core_match\Plugin\crm_core_match\field\DateFieldHandler::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/ DateFieldHandler.php, line 15
Class
- DateFieldHandler
- Class for evaluating date fields.
Namespace
Drupal\crm_core_match\Plugin\crm_core_match\fieldCode
public function getOperators($property = 'value') {
$operators = [
'=' => t('Equals'),
'>=' => t('Greater than'),
'<=' => t('Less than'),
];
return $operators;
}