fix search autocomplete duplicates
This commit is contained in:
parent
43a8daff8a
commit
81f47c4300
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue