Add a link between accompanying period and user

It is now allowed to indicates who make/made the accompanying period.

This feature may be hidden by a specific configuration option. Default
to visible.
This commit is contained in:
2019-07-01 15:21:34 +02:00
parent 5b60415166
commit 19cc54a674
13 changed files with 173 additions and 31 deletions

View File

@@ -24,6 +24,7 @@ namespace Chill\PersonBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Chill\MainBundle\Entity\User;
/**
* AccompanyingPeriod
@@ -48,6 +49,13 @@ class AccompanyingPeriod
/** @var AccompanyingPeriod\ClosingMotive */
private $closingMotive = null;
/**
* The user making the accompanying
*
* @var User
*/
private $user;
/**
*
* @param \DateTime $dateOpening
@@ -244,4 +252,18 @@ class AccompanyingPeriod
return false;
}
}
function getUser(): ?User
{
return $this->user;
}
function setUser(User $user): self
{
$this->user = $user;
return $this;
}
}