mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	(to rebase/fixup later) Let Result be associated to a SocialAction.
This commit is contained in:
		| @@ -160,7 +160,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface | ||||
|         return $goal; | ||||
|     } | ||||
|  | ||||
|     private function handleResult(?string $resultTitle = null, SocialAction $socialAction, ?Goal $goal = null): ?Result | ||||
|     private function handleResult(?string $resultTitle = null, ?SocialAction $socialAction = null, ?Goal $goal = null): ?Result | ||||
|     { | ||||
|         if (null === $resultTitle) { | ||||
|             return null; | ||||
| @@ -172,12 +172,15 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface | ||||
|  | ||||
|         if (null !== $goal) { | ||||
|             $result->addGoal($goal); | ||||
|         } else { | ||||
|             $result->addSocialAction($socialAction); | ||||
|         } | ||||
|  | ||||
|         // Why this cannot be found from the Goal entity? | ||||
|         $result->addSocialAction($socialAction); | ||||
|         $socialAction->addResult($result); | ||||
|  | ||||
|         $this->entityManager->persist($result); | ||||
|         $this->entityManager->persist($socialAction); | ||||
|  | ||||
|         return $result; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user