function search_api_views_plugins_filter_alter in Search API 8
Implements hook_views_plugins_filter_alter().
File
- ./
search_api.module, line 404 - Provides a rich framework for creating searches.
Code
function search_api_views_plugins_filter_alter(array &$plugins) {
// We have to include the term filter handler like this, since adding it
// directly (i.e., with an annotation) would cause fatal errors on sites
// without the Taxonomy module.
if (\Drupal::moduleHandler()
->moduleExists('taxonomy')) {
$plugins['search_api_term'] = [
'plugin_type' => 'filter',
'id' => 'search_api_term',
'class' => TermFilter::class,
'provider' => 'search_api',
];
}
}