mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-03 12:39:42 +00:00
Add getAssociated method to AbstractPersonResource
- Introduced `getAssociated` method to retrieve either `Person`, `ThirdParty`, or `null`. - Provides a unified accessor combining `person` and `thirdParty` properties.
This commit is contained in:
@@ -180,6 +180,11 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAssociated(): Person|ThirdParty|null
|
||||
{
|
||||
return $this->person ?? $this->thirdParty;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user