src/Entity/EpreuveTestb1.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EpreuveTestb1Repository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=EpreuveTestb1Repository::class)
  9.  */
  10. class EpreuveTestb1
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToMany(targetEntity=QuestionTestB1::class, inversedBy="epreuveTestb1s")
  20.      */
  21.     private $questiontestb1;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=EvaluationTestb1::class, mappedBy="epreuve")
  24.      */
  25.     private $evaluationTestb1s;
  26.     /**
  27.      * @ORM\Column(type="datetime", nullable=true)
  28.      */
  29.     private $createdAt;
  30.     public function __construct()
  31.     {
  32.         $this->questiontestb1 = new ArrayCollection();
  33.         $this->evaluationTestb1s = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     /**
  40.      * @return Collection<int, QuestionTestB1>
  41.      */
  42.     public function getQuestiontestb1(): Collection
  43.     {
  44.         return $this->questiontestb1;
  45.     }
  46.     public function addQuestiontestb1(QuestionTestB1 $questiontestb1): self
  47.     {
  48.         if (!$this->questiontestb1->contains($questiontestb1)) {
  49.             $this->questiontestb1[] = $questiontestb1;
  50.         }
  51.         return $this;
  52.     }
  53.     public function removeQuestiontestb1(QuestionTestB1 $questiontestb1): self
  54.     {
  55.         $this->questiontestb1->removeElement($questiontestb1);
  56.         return $this;
  57.     }
  58.     /**
  59.      * @return Collection<int, EvaluationTestb1>
  60.      */
  61.     public function getEvaluationTestb1s(): Collection
  62.     {
  63.         return $this->evaluationTestb1s;
  64.     }
  65.     public function addEvaluationTestb1(EvaluationTestb1 $evaluationTestb1): self
  66.     {
  67.         if (!$this->evaluationTestb1s->contains($evaluationTestb1)) {
  68.             $this->evaluationTestb1s[] = $evaluationTestb1;
  69.             $evaluationTestb1->setEpreuve($this);
  70.         }
  71.         return $this;
  72.     }
  73.     public function removeEvaluationTestb1(EvaluationTestb1 $evaluationTestb1): self
  74.     {
  75.         if ($this->evaluationTestb1s->removeElement($evaluationTestb1)) {
  76.             // set the owning side to null (unless already changed)
  77.             if ($evaluationTestb1->getEpreuve() === $this) {
  78.                 $evaluationTestb1->setEpreuve(null);
  79.             }
  80.         }
  81.         return $this;
  82.     }
  83.     public function getCreatedAt(): ?\DateTimeInterface
  84.     {
  85.         return $this->createdAt;
  86.     }
  87.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  88.     {
  89.         $this->createdAt $createdAt;
  90.         return $this;
  91.     }
  92. }