function SearchTextProcessor::invokePreprocess
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.
1 call to SearchTextProcessor::invokePreprocess()
- SearchTextProcessor::analyze in core/modules/ search/ src/ SearchTextProcessor.php 
- Runs the text through character analyzers in preparation for indexing.
File
- 
              core/modules/ search/ src/ SearchTextProcessor.php, line 119 
Class
- SearchTextProcessor
- Processes search text for indexing.
Namespace
Drupal\searchCode
protected function invokePreprocess(string &$text, ?string $langcode = NULL) : void {
  $this->moduleHandler
    ->invokeAllWith('search_preprocess', function (callable $hook, string $module) use (&$text, &$langcode) {
    $text = $hook($text, $langcode);
  });
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
