Class craft\helpers\Search
- Inheritance
- craft\helpers\Search
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/helpers/Search.php
Search helper.
Method | Description | Defined By |
---|---|---|
normalizeKeywords() |
Normalizes search keywords. | craft\helpers\Search |
Method Details
normalizeKeywords()
public static method
#
Normalizes search keywords.
public static string normalizeKeywords ( $str, array $ignore = [], \craft\helpers\bool $processCharMap = true )
$str |
string[], string | The dirty keywords |
$ignore |
array | Ignore words to strip out |
$processCharMap |
boolean | Whether to remove punctuation and diacritics (default is true) |
return | string | The cleansed keywords. |
---|