Search
- Type
- Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Search
- Since
- 3.0.0
Search helper.
View source (opens new window)
# Public Methods
Method | Description |
---|---|
normalizeKeywords() | Normalizes search keywords. |
# normalizeKeywords()
Normalizes search keywords.
View source (opens new window)
Arguments
$str
(string (opens new window), string (opens new window)[]) – The dirty keywords$ignore
(array (opens new window)) – Ignore words to strip out$processCharMap
(boolean (opens new window)) – Whether to remove punctuation and diacritics (default is true)$language
(string (opens new window), null (opens new window)) – The language that the character map should be based on, if$processCharMap
istrue
.
Returns
string (opens new window) – The cleansed keywords.