src/Entity/LMSSurvey.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LMSSurveyRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LMSSurveyRepository::class)
  9.  */
  10. class LMSSurvey
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $title;
  22.     /**
  23.      * @ORM\Column(type="datetime", nullable=true)
  24.      */
  25.     private $updatedAt;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=LMSAsk::class, mappedBy="survey")
  28.      */
  29.     private $lMSAsks;
  30.     /**
  31.      * @ORM\ManyToMany(targetEntity=LMSContent::class, mappedBy="LMSSurveys")
  32.      */
  33.     private $lMSContents;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=LMSAnswerSurveyUser::class, mappedBy="survey")
  36.      */
  37.     private $lMSAnswerSurveyUsers;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=LMSFreeAnswerSurvey::class, mappedBy="survey")
  40.      */
  41.     private $lMSFreeAnswerSurveys;
  42.     public function __construct()
  43.     {
  44.         $this->lMSAsks = new ArrayCollection();
  45.         $this->lMSContents = new ArrayCollection();
  46.         $this->lMSAnswerSurveyUsers = new ArrayCollection();
  47.         $this->lMSFreeAnswerSurveys = new ArrayCollection();
  48.     }
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getTitle(): ?string
  54.     {
  55.         return $this->title;
  56.     }
  57.     public function setTitle(?string $title): self
  58.     {
  59.         $this->title $title;
  60.         return $this;
  61.     }
  62.     public function getUpdatedAt(): ?\DateTimeInterface
  63.     {
  64.         return $this->updatedAt;
  65.     }
  66.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  67.     {
  68.         $this->updatedAt $updatedAt;
  69.         return $this;
  70.     }
  71.     /**
  72.      * @return Collection<int, LMSAsk>
  73.      */
  74.     public function getLMSAsks(): Collection
  75.     {
  76.         return $this->lMSAsks;
  77.     }
  78.     public function addLMSAsk(LMSAsk $lMSAsk): self
  79.     {
  80.         if (!$this->lMSAsks->contains($lMSAsk)) {
  81.             $this->lMSAsks[] = $lMSAsk;
  82.             $lMSAsk->setSurvey($this);
  83.         }
  84.         return $this;
  85.     }
  86.     public function removeLMSAsk(LMSAsk $lMSAsk): self
  87.     {
  88.         if ($this->lMSAsks->removeElement($lMSAsk)) {
  89.             // set the owning side to null (unless already changed)
  90.             if ($lMSAsk->getSurvey() === $this) {
  91.                 $lMSAsk->setSurvey(null);
  92.             }
  93.         }
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return Collection<int, LMSContent>
  98.      */
  99.     public function getLMSContents(): Collection
  100.     {
  101.         return $this->lMSContents;
  102.     }
  103.     public function addLMSContent(LMSContent $lMSContent): self
  104.     {
  105.         if (!$this->lMSContents->contains($lMSContent)) {
  106.             $this->lMSContents[] = $lMSContent;
  107.             $lMSContent->addLMSSurvey($this);
  108.         }
  109.         return $this;
  110.     }
  111.     public function removeLMSContent(LMSContent $lMSContent): self
  112.     {
  113.         if ($this->lMSContents->removeElement($lMSContent)) {
  114.             $lMSContent->removeLMSSurvey($this);
  115.         }
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return Collection<int, LMSAnswerSurveyUser>
  120.      */
  121.     public function getLMSAnswerSurveyUsers(): Collection
  122.     {
  123.         return $this->lMSAnswerSurveyUsers;
  124.     }
  125.     public function addLMSAnswerSurveyUser(LMSAnswerSurveyUser $lMSAnswerSurveyUser): self
  126.     {
  127.         if (!$this->lMSAnswerSurveyUsers->contains($lMSAnswerSurveyUser)) {
  128.             $this->lMSAnswerSurveyUsers[] = $lMSAnswerSurveyUser;
  129.             $lMSAnswerSurveyUser->setSurvey($this);
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeLMSAnswerSurveyUser(LMSAnswerSurveyUser $lMSAnswerSurveyUser): self
  134.     {
  135.         if ($this->lMSAnswerSurveyUsers->removeElement($lMSAnswerSurveyUser)) {
  136.             // set the owning side to null (unless already changed)
  137.             if ($lMSAnswerSurveyUser->getSurvey() === $this) {
  138.                 $lMSAnswerSurveyUser->setSurvey(null);
  139.             }
  140.         }
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return Collection<int, LMSFreeAnswerSurvey>
  145.      */
  146.     public function getLMSFreeAnswerSurveys(): Collection
  147.     {
  148.         return $this->lMSFreeAnswerSurveys;
  149.     }
  150.     public function addLMSFreeAnswerSurvey(LMSFreeAnswerSurvey $lMSFreeAnswerSurvey): self
  151.     {
  152.         if (!$this->lMSFreeAnswerSurveys->contains($lMSFreeAnswerSurvey)) {
  153.             $this->lMSFreeAnswerSurveys[] = $lMSFreeAnswerSurvey;
  154.             $lMSFreeAnswerSurvey->setSurvey($this);
  155.         }
  156.         return $this;
  157.     }
  158.     public function removeLMSFreeAnswerSurvey(LMSFreeAnswerSurvey $lMSFreeAnswerSurvey): self
  159.     {
  160.         if ($this->lMSFreeAnswerSurveys->removeElement($lMSFreeAnswerSurvey)) {
  161.             // set the owning side to null (unless already changed)
  162.             if ($lMSFreeAnswerSurvey->getSurvey() === $this) {
  163.                 $lMSFreeAnswerSurvey->setSurvey(null);
  164.             }
  165.         }
  166.         return $this;
  167.     }
  168. }