public static function SuggestionStorage::like in Autocomplete Search Suggestions 3.0.x
Same name and namespace in other branches
- 8.2 src/SuggestionStorage.php \Drupal\suggestion\SuggestionStorage::like()
Escape search string for LIKE.
Parameters
string $txt: The search string.
Return value
string An escaped string.
2 calls to SuggestionStorage::like()
- SuggestionController::autoComplete in src/
Controller/ SuggestionController.php - AJAX search autocomplete callback.
- SuggestionStorage::getScore in src/
SuggestionStorage.php - Calculate a suggestion's score.
File
- src/
SuggestionStorage.php, line 251
Class
- SuggestionStorage
- Database CRUD.
Namespace
Drupal\suggestionCode
public static function like($txt = '') {
return \Drupal::database()
->escapeLike($txt);
}