You are here

function suggestion_admin_search_form_update_submit in Autocomplete Search Suggestions 7

Ngram update submission function.

1 string reference to 'suggestion_admin_search_form_update_submit'
suggestion_admin_search_form in ./suggestion.admin.inc
Menu callback to index suggestions.

File

./suggestion.admin.inc, line 224
Administration form for suggestion module.

Code

function suggestion_admin_search_form_update_submit($form, &$state) {
  $src = SuggestionHelper::optionBits((array) $state['values']['src']);
  foreach ((array) $state['values']['list'] as $ngram => $val) {
    if (!$val) {
      continue;
    }
    SuggestionHelper::updateSrc($ngram, $src);
    drupal_set_message(t('Updated: “@ngram”', array(
      '@ngram' => $ngram,
    )));
  }
}