public static function SuggestionStorage::mergeSuggestion in Autocomplete Search Suggestions 7
Merge the supplied suggestion.
Parameters
array $key: The suggestion key array.
array $fields: The suggestion field array.
Return value
object A Merge object.
4 calls to SuggestionStorage::mergeSuggestion()
- SuggestionHelper::insert in src/
SuggestionHelper.php - Add a suggestion.
- SuggestionHelper::updateSrc in src/
SuggestionHelper.php - Calculate the ngram's density.
- suggestion_admin_edit_form_submit in ./
suggestion.admin.inc - Custom submit function for the suggestion setting form.
- suggestion_surfer_submit in ./
suggestion.module - Custom submit function to add surfer suggestions.
File
- src/
SuggestionStorage.php, line 256 - CRUD methods for the suggestion module.
Class
- SuggestionStorage
- Database CRUD.
Code
public static function mergeSuggestion(array $key = array(), array $fields = array()) {
return db_merge('suggestion')
->key($key)
->fields($fields)
->execute();
}