You are here

function hook_search_api_processor_info_alter in Search API 8

Same name and namespace in other branches
  1. 7 search_api.api.php \hook_search_api_processor_info_alter()

Alter the available processors.

Modules may implement this hook to alter the information that defines processors. All properties that are available in \Drupal\search_api\Annotation\SearchApiProcessor can be altered here, with the addition of the "class" and "provider" keys.

Parameters

array $processors: The processor information to be altered, keyed by processor IDs.

Deprecated

in search_api:8.x-1.14 and is removed from search_api:2.0.0. Please use the "search_api.gathering_processors" event instead.

See also

https://www.drupal.org/node/3059866

\Drupal\search_api\Processor\ProcessorPluginBase

1 function implements hook_search_api_processor_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_api_test_hooks_search_api_processor_info_alter in tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
Implements hook_search_api_processor_info_alter().
1 invocation of hook_search_api_processor_info_alter()
ProcessorPluginManager::__construct in src/Processor/ProcessorPluginManager.php
Constructs a ProcessorPluginManager object.

File

./search_api.api.php, line 96
Hooks provided by the Search API module.

Code

function hook_search_api_processor_info_alter(array &$processors) {
  if (!empty($processors['example_processor'])) {
    $processors['example_processor']['class'] = '\\Drupal\\my_module\\MuchBetterExampleProcessor';
  }
}