WIP [centerHistory] Try to get test to work for personCenterHistory

This commit is contained in:
2023-08-03 11:40:47 +02:00
parent fd79692f6d
commit 3af065e530
3 changed files with 37 additions and 15 deletions

View File

@@ -1606,6 +1606,15 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function addCenterHistory(PersonCenterHistory $newCenterHistory): self
{
if (!$this->centerHistory->contains($newCenterHistory)) {
$this->centerHistory[] = $newCenterHistory;
$newCenterHistory->setPerson($this);
}
return $this;
}
/**
* @return Person
*/