function search_invoke_preprocess

search_invoke_preprocess(&$text, $langcode = NULL)

Invokes hook_search_preprocess() to simplify text.

Parameters

string $text: Text to preprocess, passed by reference and altered in place.

string|null $langcode: Language code for the language of $text, if known.

File

core/modules/search/search.module, line 409
Enables site-wide keyword searching.

Code

function search_invoke_preprocess(&$text, $langcode = NULL) {
  foreach (\Drupal::moduleHandler()->getImplementations('search_preprocess') as $module) {
    $text = \Drupal::moduleHandler()->invoke($module, 'search_preprocess', array($text, $langcode));
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!search!search.module/function/search_invoke_preprocess/8.1.x