diff --git a/Controller/ListController.php b/Controller/ListController.php index e998790..569dbf0 100644 --- a/Controller/ListController.php +++ b/Controller/ListController.php @@ -71,19 +71,12 @@ public function listAction(Request $request) */ private function buildLocalesList($filter) { - $search = $this->repository->createSearch(); - - $localeAgg = new TermsAggregation('locale_agg'); - $localeAgg->setField('messages.locale'); - $search->addAggregation($localeAgg); - $result = $this->repository->execute($search, Result::RESULTS_RAW); + $locales = $this->container->getParameter('ongr_translations.managed_locales'); $list = []; - - foreach ($result['aggregations']['locale_agg']['buckets'] as $value) { - $list[$value['key']] = true; + foreach ($locales as $locale) { + $list[$locale] = true; } ksort($list); - $activeLocales = []; if ($filter->getState()->isActive()) {