mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
docgen: add age and base context
This commit is contained in:
@@ -74,7 +74,7 @@ class PersonDocGenNormalizer implements
|
||||
$data = [
|
||||
'type' => 'person',
|
||||
'isNull' => false,
|
||||
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expect' => Civility::class])),
|
||||
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expects' => Civility::class])),
|
||||
'firstname' => $person->getFirstName(),
|
||||
'lastname' => $person->getLastName(),
|
||||
'altNames' => implode(
|
||||
@@ -87,6 +87,7 @@ class PersonDocGenNormalizer implements
|
||||
)
|
||||
),
|
||||
'text' => $this->personRender->renderString($person, []),
|
||||
'age' => $person->getAge(),
|
||||
'birthdate' => $this->normalizer->normalize($person->getBirthdate(), $format, $dateContext),
|
||||
'deathdate' => $this->normalizer->normalize($person->getDeathdate(), $format, $dateContext),
|
||||
'gender' => $this->translator->trans($person->getGender()),
|
||||
|
Reference in New Issue
Block a user