*/ #[ORM\OneToMany(targetEntity: Question::class, mappedBy: 'quiz', cascade: ['persist'], orphanRemoval: true)] private Collection $questions; /** @var Collection */ #[ORM\OneToMany(targetEntity: Correction::class, mappedBy: 'quiz', orphanRemoval: true)] private Collection $corrections; public function __construct() { $this->questions = new ArrayCollection(); $this->corrections = 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 getSeason(): Season { return $this->season; } public function setSeason(Season $season): static { $this->season = $season; return $this; } /** @return Collection */ public function getQuestions(): Collection { return $this->questions; } public function addQuestion(Question $question): static { if (!$this->questions->contains($question)) { $this->questions->add($question); $question->setQuiz($this); } return $this; } /** @return Collection */ public function getCorrections(): Collection { return $this->corrections; } public function addCorrection(Correction $correction): static { if (!$this->corrections->contains($correction)) { $this->corrections->add($correction); $correction->setQuiz($this); } return $this; } }