mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
doc generation: add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge
This commit is contained in:
parent
4dd9bc1123
commit
692343aae4
@ -161,7 +161,7 @@ class AccompanyingPeriodContext implements
|
||||
'class' => Person::class,
|
||||
'choices' => $persons,
|
||||
'choice_label' => function (Person $p) {
|
||||
return $this->personRender->renderString($p, []);
|
||||
return $this->personRender->renderString($p, ['addAge' => true]);
|
||||
},
|
||||
'multiple' => false,
|
||||
'expanded' => true,
|
||||
|
@ -83,6 +83,13 @@ class PersonRender extends AbstractChillEntityRender
|
||||
. $this->addAltNames($person, false) . ' (' . $this->translator->trans('years_old', ['age' => $person->getAge()]) . ')';
|
||||
}
|
||||
|
||||
if (null !== $person->getDeathDate() && $options['addAge']) {
|
||||
return $person->getFirstName() . ' ' . $person->getLastName()
|
||||
. ' (‡)'
|
||||
. $this->addAltNames($person, false);
|
||||
}
|
||||
|
||||
|
||||
return $person->getFirstName() . ' ' . $person->getLastName()
|
||||
. $this->addAltNames($person, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user