further adaptations to display deathdate. deathdate added to what API returns

This commit is contained in:
2021-08-26 16:42:33 +02:00
parent 5194cad354
commit c5f40c53ea
4 changed files with 72 additions and 79 deletions

View File

@@ -69,6 +69,7 @@ class PersonNormalizer implements
'firstName' => $person->getFirstName(),
'lastName' => $person->getLastName(),
'birthdate' => $this->normalizer->normalize($person->getBirthdate()),
'deathdate' => $this->normalizer->normalize($person->getDeathdate()),
'center' => $this->normalizer->normalize($person->getCenter()),
'phonenumber' => $person->getPhonenumber(),
'mobilenumber' => $person->getMobilenumber(),
@@ -125,6 +126,7 @@ class PersonNormalizer implements
foreach ([
'birthdate' => \DateTime::class,
'deathdate' => \DateTime::class,
'center' => Center::class
] as $item => $class) {
if (\array_key_exists($item, $data)) {