Controller action to move members of an household

This commit is contained in:
2021-05-31 20:42:07 +02:00
parent ace3b1969e
commit 041b1dfc51
12 changed files with 356 additions and 48 deletions

View File

@@ -16,7 +16,7 @@ class MembersEditor
private Household $household;
private array $persistables = [];
private array $memershipsAffected = [];
private array $membershipsAffected = [];
public function __construct(ValidatorInterface $validator, Household $household)
{
@@ -24,7 +24,7 @@ class MembersEditor
$this->household = $household;
}
public function addMovement(\DateTimeInterface $date, Person $person, Position $position, ?bool $holder = false, ?string $comment = null): self
public function addMovement(\DateTimeImmutable $date, Person $person, Position $position, ?bool $holder = false, ?string $comment = null): self
{
if (NULL === $this->household) {
throw new \LogicException("You must define a household first");
@@ -71,4 +71,9 @@ class MembersEditor
{
return $this->persistables;
}
public function getHousehold(): Household
{
return $this->household;
}
}