public function SearchApiFulltext::operators in Search API 8
Returns information about the available operators for this filter.
Return value
array[] An associative array mapping operator identifiers to their information. The operator information itself is an associative array with the following keys:
- title: The translated title for the operator.
- short: The translated short title for the operator.
- values: The number of values the operator requires as input.
1 call to SearchApiFulltext::operators()
- SearchApiFulltext::operatorOptions in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Provide a list of options for the default operator form. Should be overridden by classes that don't override operatorForm
File
- src/
Plugin/ views/ filter/ SearchApiFulltext.php, line 105
Class
- SearchApiFulltext
- Defines a filter for adding a fulltext search to the view.
Namespace
Drupal\search_api\Plugin\views\filterCode
public function operators() {
return [
'and' => [
'title' => $this
->t('Contains all of these words'),
'short' => $this
->t('and'),
'values' => 1,
],
'or' => [
'title' => $this
->t('Contains any of these words'),
'short' => $this
->t('or'),
'values' => 1,
],
'not' => [
'title' => $this
->t('Contains none of these words'),
'short' => $this
->t('not'),
'values' => 1,
],
];
}