public static function SearchApiAutocompleteServerSuggester::supportsIndex in Search API Autocomplete 7
Determines whether this plugin class supports the given index.
Parameters
SearchApiIndex $index: The search index in question.
Return value
bool TRUE if this plugin supports the given search index, FALSE otherwise.
Overrides SearchApiAutocompleteSuggesterPluginBase::supportsIndex
File
- src/
SearchApiAutocompleteServerSuggester.php, line 19 - Contains SearchApiAutocompleteServerSuggester.
Class
- SearchApiAutocompleteServerSuggester
- Provides a suggester plugin that retrieves suggestions from the server.
Code
public static function supportsIndex(SearchApiIndex $index) {
try {
return $index
->server() && $index
->server()
->supportsFeature('search_api_autocomplete');
} catch (SearchApiException $e) {
return FALSE;
}
}