mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: add a social issue on an activity to an accompanying period
This commit is contained in:
parent
44ecad2bca
commit
c3558beee1
@ -257,12 +257,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
/**
|
/**
|
||||||
* Add a social issue.
|
* Add a social issue.
|
||||||
*
|
*
|
||||||
* Note: the social issue consistency (the fact that only yougest social issues
|
* Note: the social issue consistency (the fact that only youngest social issues
|
||||||
* are kept) is processed by an entity listener:
|
* are kept) is processed by an entity listener:
|
||||||
*
|
*
|
||||||
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
|
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
|
||||||
*
|
|
||||||
* @return $this
|
|
||||||
*/
|
*/
|
||||||
public function addSocialIssue(SocialIssue $socialIssue): self
|
public function addSocialIssue(SocialIssue $socialIssue): self
|
||||||
{
|
{
|
||||||
@ -270,6 +268,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
$this->socialIssues[] = $socialIssue;
|
$this->socialIssues[] = $socialIssue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->getAccompanyingPeriod() !== null) {
|
||||||
|
$this->getAccompanyingPeriod()->addSocialIssue($socialIssue);
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,6 +552,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
{
|
{
|
||||||
$this->accompanyingPeriod = $accompanyingPeriod;
|
$this->accompanyingPeriod = $accompanyingPeriod;
|
||||||
|
|
||||||
|
foreach ($this->getSocialIssues() as $issue) {
|
||||||
|
$this->accompanyingPeriod->addSocialIssue($issue);
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user