mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 11:18:25 +00:00 
			
		
		
		
	if parent in collection replace with child, problem, sibling isn't added
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user