You are here

public function NoUi::parseInput in Search API 8

Parses search keys input by the user.

Parameters

string $keys: The keywords to parse.

Return value

array|string|null The parsed keywords – either a string, or an array specifying a complex search expression, or NULL if no keywords should be set for this input. An array will contain a '#conjunction' key specifying the conjunction type, and search strings or nested expression arrays at numeric keys. Additionally, a '#negation' key might be present, which means – unless it maps to a FALSE value – that the search keys contained in that array should be negated (that is, not be present in returned results). The negation works on the whole array, not on each contained term individually – that is, with the "AND" conjunction and negation, only results that contain all the terms in the array should be excluded; with the "OR" conjunction and negation, all results containing one or more of the terms in the array should be excluded.

Overrides ParseModeInterface::parseInput

File

tests/search_api_test_no_ui/src/Plugin/search_api/parse_mode/NoUi.php, line 21

Class

NoUi
Provides a parse mode that should be hidden from the UI.

Namespace

Drupal\search_api_test_no_ui\Plugin\search_api\parse_mode

Code

public function parseInput($keys) {
  return $keys;
}