mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 13:33:48 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user