You are here

public static function SuggestionStorage::getKeywords in Autocomplete Search Suggestions 8

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

Fetch an array of priority suggestions.

Return value

array An array of suggestions.

1 call to SuggestionStorage::getKeywords()
SuggestionAdminForm::getKeywords in src/Form/SuggestionAdminForm.php
Build a list of priority suggestions.

File

src/SuggestionStorage.php, line 131

Class

SuggestionStorage
Database CRUD.

Namespace

Drupal\suggestion

Code

public static function getKeywords() {
  return db_query("SELECT ngram FROM {suggestion} WHERE src & :src ORDER BY ngram ASC", [
    ':src' => self::PRIORITY_BIT,
  ])
    ->fetchCol();
}