You are here

public static function CustomScript::supportsSearch in Search API Autocomplete 8

Determines whether this plugin supports the given search.

Parameters

\Drupal\search_api_autocomplete\SearchInterface $search: The search in question.

Return value

bool TRUE if this plugin supports the given search, FALSE otherwise.

Overrides SuggesterPluginBase::supportsSearch

File

src/Plugin/search_api_autocomplete/suggester/CustomScript.php, line 32

Class

CustomScript
Uses a custom (non-Drupal) script for generating autocomplete suggestions.

Namespace

Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\suggester

Code

public static function supportsSearch(SearchInterface $search) {
  return (bool) \Drupal::config('search_api_autocomplete.settings')
    ->get('enable_custom_scripts');
}