seasons = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(?string $name): static { $this->name = $name; return $this; } public function getLogo(): ?string { return $this->logo; } public function setLogo(?string $logo): static { $this->logo = $logo; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): static { $this->description = $description; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(?bool $active): static { $this->active = $active; return $this; } /** * @return Collection */ public function getSeasons(): Collection { return $this->seasons; } public function addSeason(Season $season): static { if (!$this->seasons->contains($season)) { $this->seasons->add($season); $season->setLeague($this); } return $this; } public function removeSeason(Season $season): static { if ($this->seasons->removeElement($season)) { // set the owning side to null (unless already changed) if ($season->getLeague() === $this) { $season->setLeague(null); } } return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } #[ORM\PrePersist] public function setCreatedAt(): void { $timezone = new \DateTimeZone('Europe/Madrid'); $this->createdAt = new \DateTimeImmutable('now', $timezone); } public function getCity(): ?string { return $this->city; } public function setCity(?string $city): static { $this->city = $city; return $this; } public function getMatchesBetweenTeams(): ?int { return $this->matchesBetweenTeams; } public function setMatchesBetweenTeams(?int $matchesBetweenTeams): static { $this->matchesBetweenTeams = $matchesBetweenTeams; return $this; } public function getBlockedMatchDates(): ?array { return $this->blockedMatchDates; } public function setBlockedMatchDates(?array $blockedMatchDates): static { $this->blockedMatchDates = $blockedMatchDates; return $this; } public function isPublic(): ?bool { return $this->isPublic; } public function setIsPublic(?bool $isPublic): static { $this->isPublic = $isPublic; return $this; } }