Normalize genderEntity for document generation

This commit is contained in:
2024-11-25 17:44:59 +01:00
parent b52532eb82
commit 0b22250dd5
3 changed files with 44 additions and 4 deletions

View File

@@ -95,7 +95,8 @@ class PersonDocGenNormalizer implements
'age' => (int) $person->getAge(),
'birthdate' => $this->normalizer->normalize($person->getBirthdate(), $format, $dateContext),
'deathdate' => $this->normalizer->normalize($person->getDeathdate(), $format, $dateContext),
'gender' => $this->normalizer->normalize($person->getGender(), $format, $genderContext),
'gender' => $this->translatableStringHelper->localize($person->getGender()->getLabel()),
'genderEntity' => $this->normalizer->normalize($person->getGender(), $format, $genderContext),
'maritalStatus' => null !== ($ms = $person->getMaritalStatus()) ? $this->translatableStringHelper->localize($ms->getName()) : '',
'maritalStatusDate' => $this->normalizer->normalize($person->getMaritalStatusDate(), $format, $dateContext),
'maritalStatusComment' => $this->normalizer->normalize($person->getMaritalStatusComment(), $format, $dateContext),