protected function SuggestionAdminForm::setKeywords in Autocomplete Search Suggestions 8
Same name and namespace in other branches
- 8.2 src/Form/SuggestionAdminForm.php \Drupal\suggestion\Form\SuggestionAdminForm::setKeywords()
- 3.0.x src/Form/SuggestionAdminForm.php \Drupal\suggestion\Form\SuggestionAdminForm::setKeywords()
Process all the priority suggestions submitted.
Parameters
Drupal\Core\Form\FormStateInterface $form_state: A Drupal form state object.
1 call to SuggestionAdminForm::setKeywords()
- SuggestionAdminForm::submitForm in src/
Form/ SuggestionAdminForm.php - Submit function for the suggestion configuration form.
File
- src/
Form/ SuggestionAdminForm.php, line 304
Class
- SuggestionAdminForm
- Suggestion configuration form.
Namespace
Drupal\suggestion\FormCode
protected function setKeywords(FormStateInterface $form_state) {
foreach (preg_split('/\\s*[\\n\\r]+\\s*/s', trim($form_state
->getValue('keywords'))) as $txt) {
SuggestionHelper::insert($txt, SuggestionStorage::PRIORITY_BIT);
}
}