src/Entity/Portal.php line 15
<?phpnamespace App\Entity;use ApiPlatform\Metadata\ApiResource;use App\Repository\PortalRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\UX\Turbo\Attribute\Broadcast;#[ORM\Entity(repositoryClass: PortalRepository::class)]#[ApiResource]#[Broadcast]class Portal{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255)]private ?string $domain = null;#[ORM\ManyToOne(inversedBy: 'portals')]private ?Corporation $corporation = null;#[ORM\OneToMany(mappedBy: 'portal', targetEntity: Catalog::class)]private Collection $catalogs;#[ORM\OneToMany(mappedBy: 'portal', targetEntity: Attendee::class)]private Collection $attendees;#[ORM\ManyToOne(inversedBy: 'portals')]private ?PortalLicense $portalLicense = null;#[ORM\Column(length: 255)]private ?string $portalType = null;#[ORM\OneToMany(mappedBy: 'portal', targetEntity: PortalAdministrator::class)]private Collection $portalAdministrators;#[ORM\OneToMany(mappedBy: 'portal', targetEntity: Landingpage::class)]private Collection $landingpages;#[ORM\Column(length: 255)]private ?string $logo = null;#[ORM\Column(length: 255)]private ?string $primaryColor = null;#[ORM\Column(length: 255)]private ?string $secondaryColor = null;public function getPortalLicense(): ?PortalLicense{return $this->portalLicense;}public function setPortalLicense(?PortalLicense $portalLicense): self{$this->portalLicense = $portalLicense;return $this;}public function __construct(){$this->catalogs = new ArrayCollection();$this->attendees = new ArrayCollection();$this->portalAdministrators = new ArrayCollection();$this->landingpages = new ArrayCollection();}public function __toString(): string{return $this->name;}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getDomain(): ?string{return $this->domain;}public function setDomain(string $domain): self{$this->domain = $domain;return $this;}public function getCorporation(): ?corporation{return $this->corporation;}public function setCorporation(?corporation $corporation): self{$this->corporation = $corporation;return $this;}/*** @return Collection<int, Catalog>*/public function getCatalogs(): Collection{return $this->catalogs;}public function addCatalog(Catalog $catalog): self{if (!$this->catalogs->contains($catalog)) {$this->catalogs->add($catalog);$catalog->setPortal($this);}return $this;}public function removeCatalog(Catalog $catalog): self{if ($this->catalogs->removeElement($catalog)) {// set the owning side to null (unless already changed)if ($catalog->getPortal() === $this) {$catalog->setPortal(null);}}return $this;}/*** @return Collection<int, Attendee>*/public function getAttendees(): Collection{return $this->attendees;}public function addAttendee(Attendee $attendee): self{if (!$this->attendees->contains($attendee)) {$this->attendees->add($attendee);$attendee->setPortal($this);}return $this;}public function removeAttendee(Attendee $attendee): self{if ($this->attendees->removeElement($attendee)) {// set the owning side to null (unless already changed)if ($attendee->getPortal() === $this) {$attendee->setPortal(null);}}return $this;}public function getPortalType(): ?string{return $this->portalType;}public function setPortalType(string $portalType): self{$this->portalType = $portalType;return $this;}/*** @return Collection<int, PortalAdministrator>*/public function getPortalAdministrators(): Collection{return $this->portalAdministrators;}public function addPortalAdministrator(PortalAdministrator $portalAdministrator): self{if (!$this->portalAdministrators->contains($portalAdministrator)) {$this->portalAdministrators->add($portalAdministrator);$portalAdministrator->setPortal($this);}return $this;}public function removePortalAdministrator(PortalAdministrator $portalAdministrator): self{if ($this->portalAdministrators->removeElement($portalAdministrator)) {// set the owning side to null (unless already changed)if ($portalAdministrator->getPortal() === $this) {$portalAdministrator->setPortal(null);}}return $this;}/*** @return Collection<int, Landingpage>*/public function getLandingpages(): Collection{return $this->landingpages;}public function addLandingpage(Landingpage $landingpage): self{if (!$this->landingpages->contains($landingpage)) {$this->landingpages->add($landingpage);$landingpage->setPortal($this);}return $this;}public function removeLandingpage(Landingpage $landingpage): self{if ($this->landingpages->removeElement($landingpage)) {// set the owning side to null (unless already changed)if ($landingpage->getPortal() === $this) {$landingpage->setPortal(null);}}return $this;}public function getLogo(): ?string{return $this->logo;}public function setLogo(?string $logo): self{$this->logo = $logo;return $this;}public function getPrimaryColor(): ?string{return $this->primaryColor;}public function setPrimaryColor(string $primaryColor): self{$this->primaryColor = $primaryColor;return $this;}public function getSecondaryColor(): ?string{return $this->secondaryColor;}public function setSecondaryColor(string $secondaryColor): self{$this->secondaryColor = $secondaryColor;return $this;}}