| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?php
- declare(strict_types=1);
- namespace App\ApiResources\Profile;
- use ApiPlatform\Core\Annotation\ApiProperty;
- /**
- * Classe resource qui contient les champs relatifs aux organizations présentent dans la requete my_profile.
- * @package App\ApiResources\Profile
- */
- class OrganizationProfile
- {
- /**
- * @ApiProperty(identifier=true)
- */
- public int $id;
- private string $name;
- private string $product;
- private string $subDomain;
- private string $website;
- private array $modules = [];
- private bool $hasChildren = false;
- private array $parents = [];
- public function __construct()
- {
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- public function setId(?int $id): self
- {
- $this->id = $id;
- return $this;
- }
- public function getName(): ?string
- {
- return $this->name;
- }
- public function setName(?string $name): self
- {
- $this->name = $name;
- return $this;
- }
- public function getProduct(): ?string
- {
- return $this->product;
- }
- public function setProduct(?string $product): self
- {
- $this->product = $product;
- return $this;
- }
- public function getSubDomain(): ?string
- {
- return $this->subDomain;
- }
- public function setSubDomain(?string $subDomain): self
- {
- $this->subDomain = $subDomain;
- return $this;
- }
- public function getWebsite(): ?string
- {
- return $this->website;
- }
- public function setWebsite(?string $website): self
- {
- $this->website = $website;
- return $this;
- }
- public function getModules(): array
- {
- $modules = $this->modules;
- return array_unique($modules);
- }
- public function setModules(array $modules): self
- {
- $this->modules = $modules;
- return $this;
- }
- public function getHasChildren(): bool
- {
- return $this->hasChildren;
- }
- public function setHasChildren(bool $hasChildren): self
- {
- $this->hasChildren = $hasChildren;
- return $this;
- }
- public function getParents(): array
- {
- return $this->parents;
- }
- public function addParent(OrganizationProfile $parent): self
- {
- $this->parents[] = $parent;
- return $this;
- }
- }
|