small adjustments

This commit is contained in:
2022-08-09 16:15:27 +02:00
parent 5b4b7473c5
commit 97ec921a0a
3 changed files with 9 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Aggregator\PersonAggregators;
use App\Repository\VendeePerson\SituationProfessionelleRepository;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
@@ -22,10 +23,13 @@ use Symfony\Component\Form\FormBuilderInterface;
final class ProfessionalSituationAggregator implements AggregatorInterface
{
private SituationProfessionelleRepository $professionalSituationRepository;
private TranslatableStringHelper $translatableStringHelper;
public function __construct(SituationProfessionelleRepository $professionalSituationRepository)
public function __construct(SituationProfessionelleRepository $professionalSituationRepository, TranslatableStringHelper $translatableStringHelper)
{
$this->professionalSituationRepository = $professionalSituationRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
@@ -70,7 +74,7 @@ final class ProfessionalSituationAggregator implements AggregatorInterface
$g = $this->professionalSituationRepository->find($value);
return $g->getName()['fr'];
return $this->translatableStringHelper->localize($g->getName());;
};
}