improve banners render : context person, with common improvements on accompanyingcourse and household context

This commit is contained in:
2021-07-01 16:13:07 +02:00
parent a78de0f96c
commit fc63955205
7 changed files with 144 additions and 70 deletions

View File

@@ -102,7 +102,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate; //to change in birthdate
private $birthdate;
/**
* The person's deathdate
@@ -733,6 +733,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
{
return $this->birthdate;
}
public function getAge(): int
{
return date_diff($this->birthdate, date_create('now'))->format("%y");
}
/**
* Set placeOfBirth