src/Entity/LMSFormation.php line 13

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