You are here

function auto_index_search_plugin_alter in Auto Index 8

Implementation of hook_search_plugin_alter

Parameters

array $definitions Defintions of discovered search plugins.:

File

./auto_index.module, line 126
Auto-index: Automatically indexes node content on update.

Code

function auto_index_search_plugin_alter(array &$definitions) {

  // Ensure we use our new class instead.
  foreach ($definitions as $name => $def) {
    if ($def['class'] == 'Drupal\\node\\Plugin\\Search\\NodeSearch') {
      $definitions[$name]['class'] = 'Drupal\\auto_index\\Plugin\\Search\\AutoIndexNodeSearch';
    }
  }
}