protected function FieldsProcessorPluginBase::processKeys in Search API 8
Preprocesses the search keywords.
Calls processKey() for individual strings.
Parameters
array|string $keys: Either a parsed keys array, or a single keywords string.
1 call to FieldsProcessorPluginBase::processKeys()
- FieldsProcessorPluginBase::preprocessSearchQuery in src/
Processor/ FieldsProcessorPluginBase.php - Preprocesses a search query.
File
- src/
Processor/ FieldsProcessorPluginBase.php, line 393
Class
- FieldsProcessorPluginBase
- Provides a base class for processors that work on individual fields.
Namespace
Drupal\search_api\ProcessorCode
protected function processKeys(&$keys) {
if (is_array($keys)) {
foreach ($keys as $key => &$v) {
if (Element::child($key)) {
$this
->processKeys($v);
if ($v === '') {
unset($keys[$key]);
}
}
}
}
else {
$this
->processKey($keys);
}
}