|
|
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|
|
namespace App\ApiResources\Profile;
|
|
|
|
|
|
use ApiPlatform\Core\Annotation\ApiProperty;
|
|
|
+use App\ApiResources\ApiResourcesInterface;
|
|
|
use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
use ApiPlatform\Core\Annotation\ApiResource;
|
|
|
|
|
|
@@ -11,8 +12,13 @@ use ApiPlatform\Core\Annotation\ApiResource;
|
|
|
* Classe resource qui contient les champs relatifs aux organizations présentent dans la requete my_profile.
|
|
|
*/
|
|
|
|
|
|
-#[ApiResource]
|
|
|
-class OrganizationProfile
|
|
|
+#[ApiResource(
|
|
|
+ collectionOperations:[],
|
|
|
+ itemOperations: [
|
|
|
+ 'get'
|
|
|
+ ]
|
|
|
+)]
|
|
|
+class OrganizationProfile implements ApiResourcesInterface
|
|
|
{
|
|
|
#[ApiProperty(identifier: true)]
|
|
|
#[Groups('access_profile_read')]
|
|
|
@@ -45,6 +51,9 @@ class OrganizationProfile
|
|
|
#[Groups('access_profile_read')]
|
|
|
private bool $showAdherentList = false;
|
|
|
|
|
|
+ #[Groups('access_profile_read')]
|
|
|
+ private ?int $currentYear = null;
|
|
|
+
|
|
|
public function getId(): ?int
|
|
|
{
|
|
|
return $this->id;
|
|
|
@@ -164,4 +173,16 @@ class OrganizationProfile
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
+
|
|
|
+ public function getCurrentYear(): ?int
|
|
|
+ {
|
|
|
+ return $this->currentYear;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setCurrentYear(?int $currentYear): self
|
|
|
+ {
|
|
|
+ $this->currentYear = $currentYear;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
}
|