mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
[accompanyingPeriodWork] add evaluation to normalizer
This commit is contained in:
@@ -164,8 +164,12 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @var Collection
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity=AccompanyingPeriodWorkEvaluation::class,
|
||||
* mappedBy="accompanyingPeriodWork"
|
||||
* mappedBy="accompanyingPeriodWork",
|
||||
* cascade={"persist"},
|
||||
* orphanRemoval=true
|
||||
* )
|
||||
* @Serializer\Groups({"read"})
|
||||
* @internal /!\ the serialization for read / write evaluations is handled in `AccompanyingPeriodWorkDenormalizer`
|
||||
*/
|
||||
private Collection $accompanyingPeriodWorkEvaluations;
|
||||
|
||||
@@ -398,6 +402,11 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
return $this->thirdParties;
|
||||
}
|
||||
|
||||
public function getThirdPartys(): Collection
|
||||
{
|
||||
return $this->getThirdParties();
|
||||
}
|
||||
|
||||
public function addThirdParty(ThirdParty $thirdParty): self
|
||||
{
|
||||
if (!$this->thirdParties->contains($thirdParty)) {
|
||||
@@ -434,4 +443,31 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAccompanyingPeriodWorkEvaluations()
|
||||
{
|
||||
return $this->accompanyingPeriodWorkEvaluations;
|
||||
}
|
||||
|
||||
public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self
|
||||
{
|
||||
if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) {
|
||||
$this->accompanyingPeriodWorkEvaluations[] = $evaluation;
|
||||
$evaluation->setAccompanyingPeriodWork($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self
|
||||
{
|
||||
$this->accompanyingPeriodWorkEvaluations
|
||||
->removeElement($evaluation);
|
||||
$evaluation->setAccompanyingPeriodWork(null);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user