mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-09 21:58:28 +00:00
Add personId serialization to PersonJsonNormalizer
- Inject `PersonIdRenderingInterface` into `PersonJsonNormalizer` for generating `personId`. - Update `PersonJsonNormalizer` to include `personId` in serialized output. - Extend TypeScript definitions to support `personId` property. - Enhance unit tests to cover `personId` serialization.
This commit is contained in:
@@ -35,6 +35,7 @@ class PersonJsonNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
private readonly CenterResolverManagerInterface $centerResolverManager,
|
||||
private readonly ResidentialAddressRepository $residentialAddressRepository,
|
||||
private readonly PhoneNumberHelperInterface $phoneNumberHelper,
|
||||
private readonly \Chill\PersonBundle\PersonIdentifier\Rendering\PersonIdRenderingInterface $personIdRendering,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,7 @@ class PersonJsonNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
'email' => $person->getEmail(),
|
||||
'gender' => $this->normalizer->normalize($person->getGender(), $format, $context),
|
||||
'civility' => $this->normalizer->normalize($person->getCivility(), $format, $context),
|
||||
'personId' => $this->personIdRendering->renderPersonId($person),
|
||||
];
|
||||
|
||||
if (\in_array('minimal', $groups, true) && 1 === \count($groups)) {
|
||||
|
||||
Reference in New Issue
Block a user