mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
switch to using getDescendantsWithThis()
This commit is contained in:
parent
ea21f2d9c4
commit
f09870931c
@ -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;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ class SocialAction
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|self[] All the descendants with the current entity (this)
|
||||
* @return Collection|self[] All the descendants including the current entity (this)
|
||||
*/
|
||||
public function getDescendantsWithThis(): Collection
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ class SocialIssue
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|self[] All the descendants with the current entity (this)
|
||||
* @return Collection|self[] All the descendants including the current entity (this)
|
||||
*/
|
||||
public function getDescendantsWithThis(): Collection
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user