*/ #[ORM\OneToMany(targetEntity: Space::class, mappedBy: 'event', orphanRemoval: true)] private Collection $spaces; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Period::class, mappedBy: 'event', orphanRemoval: true)] private Collection $periods; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Slot::class, mappedBy: 'event', orphanRemoval: true)] private Collection $slots; public function __construct() { $this->spaces = new ArrayCollection(); $this->periods = new ArrayCollection(); $this->slots = new ArrayCollection(); } public function getId(): ?Uuid { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): static { $this->description = $description; return $this; } public function getPicture(): ?string { return $this->picture; } public function setPicture(?string $picture): static { $this->picture = $picture; return $this; } public function getStartOn(): ?\DateTimeInterface { return $this->startOn; } public function setStartOn(\DateTimeInterface $startOn): static { $this->startOn = $startOn; return $this; } public function getEndOn(): ?\DateTimeInterface { return $this->endOn; } public function setEndOn(\DateTimeInterface $endOn): static { $this->endOn = $endOn; return $this; } public function getMoreLink() { return $this->moreLink; } public function setMoreLink($moreLink): static { $this->moreLink = $moreLink; return $this; } public function getSlug() { return $this->slug; } public function setSlug($slug): static { $this->slug = $slug; return $this; } public function isPublished(): ?bool { return $this->published; } public function setPublished(?bool $published): static { $this->published = $published; return $this; } public function isPrivate(): ?bool { return $this->private; } public function setPrivate(?bool $private): static { $this->private = $private; return $this; } public function isHiddenPlanning(): ?bool { return $this->hiddenPlanning; } public function setHiddenPlanning(?bool $hiddenPlanning): static { $this->hiddenPlanning = $hiddenPlanning; return $this; } public function isEveryoneCanAskForGame(): ?bool { return $this->everyoneCanAskForGame; } public function setEveryoneCanAskForGame(?bool $everyoneCanAskForGame): static { $this->everyoneCanAskForGame = $everyoneCanAskForGame; return $this; } /** * @return Collection */ public function getSpaces(): Collection { return $this->spaces; } public function addSpace(Space $space): static { if (!$this->spaces->contains($space)) { $this->spaces->add($space); $space->setEvent($this); } return $this; } public function removeSpace(Space $space): static { if ($this->spaces->removeElement($space)) { // set the owning side to null (unless already changed) if ($space->getEvent() === $this) { $space->setEvent(null); } } return $this; } /** * @return Collection */ public function getPeriods(): Collection { return $this->periods; } public function addPeriod(Period $period): static { if (!$this->periods->contains($period)) { $this->periods->add($period); $period->setEvent($this); } return $this; } public function removePeriod(Period $period): static { if ($this->periods->removeElement($period)) { // set the owning side to null (unless already changed) if ($period->getEvent() === $this) { $period->setEvent(null); } } return $this; } /** * @return Collection */ public function getSlots(): Collection { return $this->slots; } public function addSlot(Slot $slot): static { if (!$this->slots->contains($slot)) { $this->slots->add($slot); $slot->setEvent($this); } return $this; } public function removeSlot(Slot $slot): static { if ($this->slots->removeElement($slot)) { // set the owning side to null (unless already changed) if ($slot->getEvent() === $this) { $slot->setEvent(null); } } return $this; } }