mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
person: add person ressource to person docgen normaliser
This commit is contained in:
@@ -117,6 +117,27 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->person;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
public function getResourceKind(): string
|
||||
{
|
||||
if ($this->getPerson() instanceof Person) {
|
||||
return 'person';
|
||||
}
|
||||
|
||||
if ($this->getThirdParty() instanceof ThirdParty) {
|
||||
return 'thirdparty';
|
||||
}
|
||||
|
||||
if (null !== $this->getFreeText()) {
|
||||
return 'freetext';
|
||||
}
|
||||
|
||||
return 'none';
|
||||
}
|
||||
|
||||
|
||||
public function getPersonOwner(): ?Person
|
||||
{
|
||||
return $this->personOwner;
|
||||
|
Reference in New Issue
Block a user