Ver Fonte

add legal status inside organization profile

Vincent GUFFON há 3 anos atrás
pai
commit
018a6de6dd

+ 15 - 0
src/ApiResources/Profile/OrganizationProfile.php

@@ -30,6 +30,9 @@ class OrganizationProfile implements ApiResourcesInterface
     #[Groups('access_profile_read')]
     private ?string $product = null;
 
+    #[Groups('access_profile_read')]
+    private ?string $legalStatus = null;
+
     #[Groups('access_profile_read')]
     private ?string $subDomain = null;
 
@@ -90,6 +93,18 @@ class OrganizationProfile implements ApiResourcesInterface
         return $this;
     }
 
+    public function getLegalStatus(): ?string
+    {
+        return $this->legalStatus;
+    }
+
+    public function setLegalStatus(?string $legalStatus): self
+    {
+        $this->legalStatus = $legalStatus;
+
+        return $this;
+    }
+
     public function getNetworks(): array
     {
         return $this->networks;

+ 1 - 0
src/Service/Organization/OrganizationProfileCreator.php

@@ -33,6 +33,7 @@ class OrganizationProfileCreator
         $organizationProfile = $this->createLightOrganizationProfile($organization);
         $organizationProfile->setModules($this->module->getOrganizationModules($organization));
         $organizationProfile->setProduct($organization->getSettings()->getProduct());
+        $organizationProfile->setLegalStatus($organization->getLegalStatus());
         $organizationProfile->setHasChildren($organization->getNetworkOrganizationChildren()->count() > 1);
         $organizationProfile->setShowAdherentList($organization->getParameters()->getShowAdherentList() && $organization->getPrincipalType() != PrincipalTypeEnum::ARTISTIC_EDUCATION_ONLY());