src/Entity/LMSSequence.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LMSSequenceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LMSSequenceRepository::class)
  9.  */
  10. class LMSSequence
  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)
  20.      */
  21.     private $title;
  22.     /**
  23.      * @ORM\Column(type="text", nullable="true")
  24.      */
  25.     private $description;
  26.     /**
  27.      * @ORM\Column(type="integer")
  28.      */
  29.     private $duration;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      */
  33.     private $isOnline;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private $isActive;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=LMSModule::class, inversedBy="lMSSequences")
  40.      */
  41.     private $lmsModule;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=LMSContent::class, mappedBy="lMSSequence")
  44.      */
  45.     private $lmsContents;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity=LMSExercise::class, mappedBy="lMSSequence")
  48.      */
  49.     private $lmsExercises;
  50.     /**
  51.      * @ORM\ManyToMany(targetEntity=User::class, mappedBy="LMSSequences")
  52.      */
  53.     private $users;
  54.     private $progressionSequence;
  55.     public function __construct()
  56.     {
  57.         $this->lmsContents = new ArrayCollection();
  58.         $this->lmsExercises = new ArrayCollection();
  59.         $this->users = new ArrayCollection();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getTitle(): ?string
  66.     {
  67.         return $this->title;
  68.     }
  69.     public function setTitle(string $title): self
  70.     {
  71.         $this->title $title;
  72.         return $this;
  73.     }
  74.     public function getDescription(): ?string
  75.     {
  76.         return $this->description;
  77.     }
  78.     public function setDescription(string $description): self
  79.     {
  80.         $this->description $description;
  81.         return $this;
  82.     }
  83.     public function getDuration(): ?int
  84.     {
  85.         return $this->duration;
  86.     }
  87.     public function setDuration(int $duration): self
  88.     {
  89.         $this->duration $duration;
  90.         return $this;
  91.     }
  92.     public function isIsOnline(): ?bool
  93.     {
  94.         return $this->isOnline;
  95.     }
  96.     public function setIsOnline(bool $isOnline): self
  97.     {
  98.         $this->isOnline $isOnline;
  99.         return $this;
  100.     }
  101.     public function isIsActive(): ?bool
  102.     {
  103.         return $this->isActive;
  104.     }
  105.     public function setIsActive(bool $isActive): self
  106.     {
  107.         $this->isActive $isActive;
  108.         return $this;
  109.     }
  110.     public function getLmsModule(): ?LMSModule
  111.     {
  112.         return $this->lmsModule;
  113.     }
  114.     public function setLmsModule(?LMSModule $lmsModule): self
  115.     {
  116.         $this->lmsModule $lmsModule;
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return Collection<int, LMSContent>
  121.      */
  122.     public function getLmsContents(): Collection
  123.     {
  124.         return $this->lmsContents;
  125.     }
  126.     public function addLmsContent(LMSContent $lmsContent): self
  127.     {
  128.         if (!$this->lmsContents->contains($lmsContent)) {
  129.             $this->lmsContents[] = $lmsContent;
  130.             $lmsContent->setLMSSequence($this);
  131.         }
  132.         return $this;
  133.     }
  134.     public function removeLmsContent(LMSContent $lmsContent): self
  135.     {
  136.         if ($this->lmsContents->removeElement($lmsContent)) {
  137.             // set the owning side to null (unless already changed)
  138.             if ($lmsContent->getLMSSequence() === $this) {
  139.                 $lmsContent->setLMSSequence(null);
  140.             }
  141.         }
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return Collection<int, LMSExercise>
  146.      */
  147.     public function getLmsExercises(): Collection
  148.     {
  149.         return $this->lmsExercises;
  150.     }
  151.     public function addLmsExercise(LMSExercise $lmsExercise): self
  152.     {
  153.         if (!$this->lmsExercises->contains($lmsExercise)) {
  154.             $this->lmsExercises[] = $lmsExercise;
  155.             $lmsExercise->setLMSSequence($this);
  156.         }
  157.         return $this;
  158.     }
  159.     public function removeLmsExercise(LMSExercise $lmsExercise): self
  160.     {
  161.         if ($this->lmsExercises->removeElement($lmsExercise)) {
  162.             // set the owning side to null (unless already changed)
  163.             if ($lmsExercise->getLMSSequence() === $this) {
  164.                 $lmsExercise->setLMSSequence(null);
  165.             }
  166.         }
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return Collection<int, User>
  171.      */
  172.     public function getUsers(): Collection
  173.     {
  174.         return $this->users;
  175.     }
  176.     public function addUser(User $user): self
  177.     {
  178.         if (!$this->users->contains($user)) {
  179.             $this->users[] = $user;
  180.             $user->addLMSSequence($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeUser(User $user): self
  185.     {
  186.         if ($this->users->removeElement($user)) {
  187.             $user->removeLMSSequence($this);
  188.         }
  189.         return $this;
  190.     }
  191.     /**
  192.      * Get the value of contentProgression
  193.      */ 
  194.     public function getProgressionSequence()
  195.     {
  196.         return $this->progressionSequence;
  197.     }
  198.     /**
  199.      * Set the value of contentProgression
  200.      *
  201.      * @return  self
  202.      */ 
  203.     public function setProgressionSequence($progressionSequence)
  204.     {
  205.         $this->progressionSequence $progressionSequence;
  206.         return $this;
  207.     }
  208. }