public static function SuggestionHelper::setStops in Autocomplete Search Suggestions 8.2
Same name and namespace in other branches
- 8 src/SuggestionHelper.php \Drupal\suggestion\SuggestionHelper::setStops()
- 3.0.x src/SuggestionHelper.php \Drupal\suggestion\SuggestionHelper::setStops()
Configuration get wrapper.
Parameters
string $key: The field name.
mixed $val: The field value.
Return value
mixed The value of the supplied field.
1 call to SuggestionHelper::setStops()
- SuggestionAdminForm::setStopwords in src/
Form/ SuggestionAdminForm.php - Process all the stopwords submitted.
File
- src/
SuggestionHelper.php, line 285
Class
- SuggestionHelper
- Provides helper methods for suggestions.
Namespace
Drupal\suggestionCode
public static function setStops($key = '', $val = NULL) {
$cfg =& drupal_static(__CLASS__ . '_' . __FUNCTION__, \Drupal::configFactory()
->getEditable('suggestion.stopword'));
return $key ? $cfg
->set($key, $val)
->save() : NULL;
}