You are here

function hook_search_api_tracker_info_alter in Search API 8

Alter the tracker info.

Parameters

array $tracker_info: The Search API tracker info array, keyed by tracker ID.

Deprecated

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

See also

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

\Drupal\search_api\Tracker\TrackerPluginBase

1 function implements hook_search_api_tracker_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_tracker_info_alter in tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
Implements hook_search_api_tracker_info_alter().
1 invocation of hook_search_api_tracker_info_alter()
TrackerPluginManager::__construct in src/Tracker/TrackerPluginManager.php
Constructs a TrackerPluginManager object.

File

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

Code

function hook_search_api_tracker_info_alter(array &$tracker_info) {
  if (isset($tracker_info['default'])) {
    $tracker_info['default']['example_original_class'] = $tracker_info['default']['class'];
    $tracker_info['default']['class'] = '\\Drupal\\my_module\\Plugin\\search_api\\tracker\\MyCustomImplementationTracker';
  }
}