Search

Type
Class
Namespace
craft\helpers
Inherits
craft\helpers\Search
Since
3.0

Search helper.

View source

Public Methods

MethodDescription
normalizeKeywords()Normalizes search keywords.

normalizeKeywords()

Normalizes search keywords.

View source

Arguments

  • $str (string[], string) – The dirty keywords
  • $ignore (array) – Ignore words to strip out
  • $processCharMap (boolean) – Whether to remove punctuation and diacritics (default is true)
  • $language

Returns

string – The cleansed keywords.

Signature

public static string normalizeKeywords ( $str, array $ignore = [], \craft\helpers\bool $processCharMap = true, \craft\helpers\string $language = null )