mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge branch '50-ajout-problematique-sociale-modele' into 139_demandeur
This commit is contained in:
@@ -27,6 +27,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
@@ -241,6 +242,16 @@ class AccompanyingPeriod
|
||||
*/
|
||||
private $resources;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity=SocialIssue::class
|
||||
* )
|
||||
* @ORM\JoinTable(
|
||||
* name="chill_person_accompanying_period_social_issues"
|
||||
* )
|
||||
*/
|
||||
private Collection $socialIssues;
|
||||
|
||||
/**
|
||||
* AccompanyingPeriod constructor.
|
||||
*
|
||||
@@ -251,6 +262,7 @@ class AccompanyingPeriod
|
||||
$this->setOpeningDate($dateOpening);
|
||||
$this->participations = new ArrayCollection();
|
||||
$this->scopes = new ArrayCollection();
|
||||
$this->socialIssues = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,7 +473,7 @@ class AccompanyingPeriod
|
||||
return false;
|
||||
}
|
||||
|
||||
$participation = $this->participationsContainsPerson($person);
|
||||
$participation = $this->getParticipationsContainsPerson($person);
|
||||
if (!null === $participation)
|
||||
{
|
||||
$person = $participation->getPerson();
|
||||
@@ -710,6 +722,23 @@ class AccompanyingPeriod
|
||||
$this->resources->removeElement($resource);
|
||||
}
|
||||
|
||||
public function getSocialIssues(): Collection
|
||||
{
|
||||
return $this->socialIssues;
|
||||
}
|
||||
|
||||
public function addSocialIssues(SocialIssue $socialIssue): self
|
||||
{
|
||||
$this->socialIssues[] = $socialIssue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSocialIssue(SocialIssue $socialissue): void
|
||||
{
|
||||
$this->socialIssues->removeElement($socialIssue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of all persons which are participating to this course
|
||||
*/
|
||||
|
Reference in New Issue
Block a user