diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index ac67a73e4..f157401a7 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -231,6 +231,18 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac public function addSocialAction(SocialAction $socialAction): self { $descendants = $socialAction->getDescendantsWithThis(); + $parent = $socialAction->getParent(); + + dump($this->socialActions); + dump($parent); + + $parentKey = array_search($parent, $this->socialActions->toArray()); + + if (null !== $parentKey) { + dump(true); + $this->socialActions[$parentKey] = $socialAction; + // return $this; + } if (count($descendants) > 0) { foreach ($descendants as $d) {