You are here

public static function SuggestionStorage::truncateSuggestion in Autocomplete Search Suggestions 3.0.x

Same name and namespace in other branches
  1. 8.2 src/SuggestionStorage.php \Drupal\suggestion\SuggestionStorage::truncateSuggestion()
  2. 8 src/SuggestionStorage.php \Drupal\suggestion\SuggestionStorage::truncateSuggestion()

Truncate the suggestion table.

Return value

object A new TruncateQuery object for this connection.

1 call to SuggestionStorage::truncateSuggestion()
SuggestionIndexForm::submitForm in src/Form/SuggestionIndexForm.php
AJAX callback for the indexing form.

File

src/SuggestionStorage.php, line 298

Class

SuggestionStorage
Database CRUD.

Namespace

Drupal\suggestion

Code

public static function truncateSuggestion() {
  return \Drupal::database()
    ->truncate('suggestion')
    ->execute();
}