You are here

function suggestion_index_block_ajax_callback in Autocomplete Search Suggestions 7

Drupal AJAX callback form for the "Index Suggestions" block.

1 string reference to 'suggestion_index_block_ajax_callback'
suggestion_admin_index_form in ./suggestion.admin.inc
Menu callback to index suggestions.

File

./suggestion.module, line 82
Autocomplete suggestions.

Code

function suggestion_index_block_ajax_callback(&$form, &$state) {
  if (!empty($state['values']['flush'])) {
    SuggestionStorage::truncateSuggestion();
  }
  SuggestionHelper::index();
  return array(
    '#markup' => '<div id="suggestion-index-feedback"><p>' . t('Suggestions Indexed') . '</p></div>',
  );
}