*/ #[ORM\OneToMany(targetEntity: Festival::class, mappedBy: 'serieFestival')] private Collection $festivals; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $dateCreation = null; #[ORM\ManyToOne(inversedBy: 'seriesFestival')] private ?User $user = null; public function __construct() { $this->festivals = 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; } /** * @return Collection */ public function getFestivals(): Collection { return $this->festivals; } public function addFestival(Festival $festival): static { if (!$this->festivals->contains($festival)) { $this->festivals->add($festival); $festival->setSerieFestival($this); } return $this; } public function removeFestival(Festival $festival): static { if ($this->festivals->removeElement($festival)) { // set the owning side to null (unless already changed) if ($festival->getSerieFestival() === $this) { $festival->setSerieFestival(null); } } return $this; } public function getDateCreation(): ?\DateTimeInterface { return $this->dateCreation; } public function setDateCreation(\DateTimeInterface $dateCreation): static { $this->dateCreation = $dateCreation; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): static { $this->user = $user; return $this; } }