mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
switch to using getDescendantsWithThis()
This commit is contained in:
@@ -230,7 +230,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
|
||||
public function addSocialAction(SocialAction $socialAction): self
|
||||
{
|
||||
$descendants = $socialAction->getDescendants();
|
||||
$descendants = $socialAction->getDescendantsWithThis();
|
||||
|
||||
if (count($descendants) > 0) {
|
||||
foreach ($descendants as $d) {
|
||||
@@ -240,16 +240,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$this->socialActions->contains($socialAction)) {
|
||||
$this->socialActions[] = $socialAction;
|
||||
}
|
||||
|
||||
$this->socialActions[] = $socialAction;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addSocialIssue(SocialIssue $socialIssue): self
|
||||
{
|
||||
$descendants = $socialIssue->getDescendants();
|
||||
$descendants = $socialIssue->getDescendantsWithThis();
|
||||
|
||||
if (count($descendants) > 0) {
|
||||
foreach ($descendants as $d) {
|
||||
@@ -260,9 +258,8 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->socialIssues->contains($socialIssue)) {
|
||||
$this->socialIssues[] = $socialIssue;
|
||||
}
|
||||
$this->socialIssues[] = $socialIssue;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user