mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fix nationality aggregator
This commit is contained in:
@@ -124,17 +124,19 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV
|
||||
->getQuery()
|
||||
->getResult(\Doctrine\ORM\Query::HYDRATE_SCALAR);
|
||||
|
||||
|
||||
// initialize array and add blank key for null values
|
||||
$labels = [
|
||||
'' => $this->translator->trans('without data'),
|
||||
'_header' => $this->translator->trans('Nationality'),
|
||||
];
|
||||
|
||||
|
||||
foreach ($countries as $row) {
|
||||
$labels[$row['c_countryCode']] = $this->translatableStringHelper->localize($row['c_name']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ('continent' === $data['group_by_level']) {
|
||||
$labels = [
|
||||
'EU' => $this->translator->trans('Europe'),
|
||||
@@ -149,9 +151,10 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV
|
||||
];
|
||||
}
|
||||
|
||||
return static function (string $value) use ($labels): string {
|
||||
return function ($value) use ($labels): string {
|
||||
return $labels[$value];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public function getQueryKeys($data)
|
||||
|
Reference in New Issue
Block a user