fix search autocomplete duplicates

This commit is contained in:
Bachir Soussi Chiadmi 2021-05-20 20:19:42 +02:00
parent 43a8daff8a
commit 81f47c4300
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ class FormAutocomplete extends ControllerBase {
// ->addCondition('author', 1, '<>');
// Restrict the search to specific languages.
// $query->setLanguages(['de', 'it']);
$lang = \Drupal::languageManager()->getCurrentLanguage()->getId();
$query->setLanguages([$lang]);
// Do paging.
$query->range(0, 10);