mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Feature: [person][creation] Add center field to OnTheFly/Person
This commit is contained in:
@@ -1567,7 +1567,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCenter(Center $center): self
|
||||
public function setCenter(?Center $center): self
|
||||
{
|
||||
$modification = new DateTimeImmutable('now');
|
||||
|
||||
@@ -1577,7 +1577,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
}
|
||||
}
|
||||
|
||||
$this->centerHistory[] = $new = new PersonCenterHistory($this, $center, $modification);
|
||||
if (null === $center) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->centerHistory[] = new PersonCenterHistory($this, $center, $modification);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user