mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Controller action to move members of an household
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user