small adjustments

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

View File

@ -31,7 +31,7 @@ class MaritalStatus
private ?string $id; private ?string $id;
/** /**
* @var string array * @var array
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private array $name; private array $name;

View File

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

View File

@ -15,6 +15,7 @@ use Chill\MainBundle\Export\FilterInterface;
use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Export\Declarations;
use DateTime; use DateTime;
use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\Query\Expr\Andx;
use Symfony\Component\Form\FormBuilderInterface;
class EntrustedChildFilter implements FilterInterface class EntrustedChildFilter implements FilterInterface
{ {
@ -48,7 +49,7 @@ class EntrustedChildFilter implements FilterInterface
return Declarations::PERSON_TYPE; return Declarations::PERSON_TYPE;
} }
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
// No form needed // No form needed
} }