| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- <?php
- declare(strict_types=1);
- namespace App\ApiResources\Public;
- use ApiPlatform\Core\Annotation\ApiProperty;
- use ApiPlatform\Core\Annotation\ApiResource;
- use App\ApiResources\ApiResourcesInterface;
- /**
- * Structure telle qu'elle est représentée sur l'iframe de recherche des structures d'une fédération
- */
- #[ApiResource(
- collectionOperations: [
- 'get' => [
- 'method' => 'GET',
- 'path' => '/public/federation_structures' // required query : '?parent={\d+}'
- ]
- ],
- itemOperations: [
- 'get' => [
- 'method' => 'GET',
- 'path' => '/public/federation_structures/{id}',
- 'requirements' => ['id' => '\d+']
- ]
- ]
- )]
- class FederationStructure implements ApiResourcesInterface
- {
- #[ApiProperty(identifier: true)]
- private int $id;
- private ?string $name;
- private ?int $logoId;
- private ?string $description;
- private ?int $imageId;
- private ?string $principalType;
- private ?string $website;
- private string $addresses;
- private ?string $telphone;
- private ?string $mobilPhone;
- private ?string $email;
- private ?string $facebook;
- private ?string $twitter;
- private ?string $instagram;
- private ?string $youtube;
- private ?array $articles;
- private ?string $practices;
- private ?float $latitude;
- private ?float $longitude;
- private ?int $n1Id;
- private ?string $n1Name;
- private ?int $n2Id;
- private ?int $n3Id;
- private ?int $n4Id;
- private ?int $n5Id;
- private ?string $parents;
- /**
- * @return int
- */
- public function getId(): int
- {
- return $this->id;
- }
- /**
- * @param int $id
- * @return FederationStructure
- */
- public function setId(int $id): self
- {
- $this->id = $id;
- return $this;
- }
- /**
- * @return string
- */
- public function getName(): string
- {
- return $this->name;
- }
- /**
- * @param string $name
- * @return FederationStructure
- */
- public function setName(string $name): self
- {
- $this->name = $name;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getLogoId(): ?int
- {
- return $this->logoId;
- }
- /**
- * @param int|null $logoId
- * @return FederationStructure
- */
- public function setLogoId(?int $logoId): self
- {
- $this->logoId = $logoId;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getDescription(): ?string
- {
- return $this->description;
- }
- /**
- * @param string|null $description
- * @return FederationStructure
- */
- public function setDescription(?string $description): self
- {
- $this->description = $description;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getImageId(): ?int
- {
- return $this->imageId;
- }
- /**
- * @param int|null $imageId
- * @return FederationStructure
- */
- public function setImageId(?int $imageId): self
- {
- $this->imageId = $imageId;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getPrincipalType(): ?string
- {
- return $this->principalType;
- }
- /**
- * @param string|null $principalType
- * @return FederationStructure
- */
- public function setPrincipalType(?string $principalType): self
- {
- $this->principalType = $principalType;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getWebsite(): ?string
- {
- return $this->website;
- }
- /**
- * @param string|null $website
- * @return FederationStructure
- */
- public function setWebsite(?string $website): self
- {
- $this->website = $website;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getAddresses(): ?string
- {
- return $this->addresses;
- }
- /**
- * @param string|null $addresses
- * @return FederationStructure
- */
- public function setAddresses(?string $addresses): self
- {
- $this->addresses = $addresses;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getTelphone(): ?string
- {
- return $this->telphone;
- }
- /**
- * @param string|null $telphone
- */
- public function setTelphone(?string $telphone): self
- {
- $this->telphone = $telphone;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getMobilPhone(): ?string
- {
- return $this->mobilPhone;
- }
- /**
- * @param string|null $mobilPhone
- */
- public function setMobilPhone(?string $mobilPhone): self
- {
- $this->mobilPhone = $mobilPhone;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getEmail(): ?string
- {
- return $this->email;
- }
- /**
- * @param string|null $email
- */
- public function setEmail(?string $email): self
- {
- $this->email = $email;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getFacebook(): ?string
- {
- return $this->facebook;
- }
- /**
- * @param string|null $facebook
- */
- public function setFacebook(?string $facebook): self
- {
- $this->facebook = $facebook;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getTwitter(): ?string
- {
- return $this->twitter;
- }
- /**
- * @param string|null $twitter
- */
- public function setTwitter(?string $twitter): self
- {
- $this->twitter = $twitter;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getInstagram(): ?string
- {
- return $this->instagram;
- }
- /**
- * @param string|null $instagram
- */
- public function setInstagram(?string $instagram): self
- {
- $this->instagram = $instagram;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getYoutube(): ?string
- {
- return $this->youtube;
- }
- /**
- * @param string|null $youtube
- * @return FederationStructure
- */
- public function setYoutube(?string $youtube): self
- {
- $this->youtube = $youtube;
- return $this;
- }
- /**
- * @return array|null
- */
- public function getArticles(): ?array
- {
- return $this->articles;
- }
- /**
- * @param array|null $articles
- */
- public function setArticles(?array $articles): self
- {
- $this->articles = $articles;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getPractices(): ?string
- {
- return $this->practices;
- }
- /**
- * @param string|null $practices
- * @return FederationStructure
- */
- public function setPractices(?string $practices): self
- {
- $this->practices = $practices;
- return $this;
- }
- /**
- * @return float|null
- */
- public function getLatitude(): ?float
- {
- return $this->latitude;
- }
- /**
- * @param float|null $latitude
- * @return FederationStructure
- */
- public function setLatitude(?float $latitude): self
- {
- $this->latitude = $latitude;
- return $this;
- }
- /**
- * @return float|null
- */
- public function getLongitude(): ?float
- {
- return $this->longitude;
- }
- /**
- * @param float|null $longitude
- * @return FederationStructure
- */
- public function setLongitude(?float $longitude): self
- {
- $this->longitude = $longitude;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getN1Id(): ?int
- {
- return $this->n1Id;
- }
- /**
- * @param int|null $n1Id
- * @return FederationStructure
- */
- public function setN1Id(?int $n1Id): self
- {
- $this->n1Id = $n1Id;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getN1Name(): ?string
- {
- return $this->n1Name;
- }
- /**
- * @param string|null $n1Name
- * @return FederationStructure
- */
- public function setN1Name(?string $n1Name): self
- {
- $this->n1Name = $n1Name;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getN2Id(): ?int
- {
- return $this->n2Id;
- }
- /**
- * @param int|null $n2Id
- * @return FederationStructure
- */
- public function setN2Id(?int $n2Id): self
- {
- $this->n2Id = $n2Id;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getN3Id(): ?int
- {
- return $this->n3Id;
- }
- /**
- * @param int|null $n3Id
- * @return FederationStructure
- */
- public function setN3Id(?int $n3Id): self
- {
- $this->n3Id = $n3Id;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getN4Id(): ?int
- {
- return $this->n4Id;
- }
- /**
- * @param int|null $n4Id
- * @return FederationStructure
- */
- public function setN4Id(?int $n4Id): self
- {
- $this->n4Id = $n4Id;
- return $this;
- }
- /**
- * @return int|null
- */
- public function getN5Id(): ?int
- {
- return $this->n5Id;
- }
- /**
- * @param int|null $n5Id
- * @return FederationStructure
- */
- public function setN5Id(?int $n5Id): self
- {
- $this->n5Id = $n5Id;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getParents(): ?string
- {
- return $this->parents;
- }
- /**
- * @param string|null $parents
- * @return FederationStructure
- */
- public function setParents(?string $parents): self
- {
- $this->parents = $parents;
- return $this;
- }
- }
|