protected function SpellCheck::getFilters in Search API Spellcheck 8
Gets a list of filters.
Return value
array The filters by key value.
1 call to SpellCheck::getFilters()
- SpellCheck::getFilterMatch in src/
Plugin/ views/ area/ SpellCheck.php - Gets the matching filter for the suggestion.
File
- src/
Plugin/ views/ area/ SpellCheck.php, line 195
Class
- SpellCheck
- Provides an area for messages.
Namespace
Drupal\search_api_spellcheck\Plugin\views\areaCode
protected function getFilters() {
if (NULL === $this->filters) {
$this->filters = [];
$exposed_input = $this->view
->getExposedInput();
foreach ($this->view->filter as $key => $filter) {
if ($filter instanceof SearchApiFulltext) {
// The filter could be different then the key.
if (!empty($filter->options['expose']['identifier'])) {
$key = $filter->options['expose']['identifier'];
}
$this->filters[$key] = !empty($exposed_input[$key]) ? strtolower($exposed_input[$key]) : FALSE;
}
}
}
return $this->filters;
}