src/Entity/LMSModule.php line 13

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