src/Entity/FormationElearning.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\FormationElearningRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassFormationElearningRepository::class)]
  10. #[ApiResource]
  11. class FormationElearning
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $titre null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $description null;
  21.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  22.     private ?string $programme null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $affiche null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $prix null;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?bool $isPromo null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $prixPromo null;
  31.     #[ORM\ManyToOne(inversedBy'formationElearnings')]
  32.     private ?CategorieElearning $categorie null;
  33.     #[ORM\ManyToOne(inversedBy'formationElearnings')]
  34.     private ?User $formateur null;
  35.     #[ORM\OneToMany(mappedBy'formation'targetEntityVideoElearning::class,cascade: ['remove'])]
  36.     private Collection $videoElearnings;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $slug null;
  39.     #[ORM\OneToMany(mappedBy'formation'targetEntityCommandeFormation::class,cascade: ['remove'])]
  40.     private Collection $commandeFormations;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $video null;
  43.     #[ORM\OneToMany(mappedBy'formation'targetEntitySectionElearning::class,cascade: ['remove'])]
  44.     private Collection $sectionElearnings;
  45.     #[ORM\OneToMany(mappedBy'formation'targetEntityTemoignageElearning::class,cascade: ['remove'])]
  46.     private Collection $temoignageElearnings;
  47.     #[ORM\OneToMany(mappedBy'formation'targetEntityCertifElearning::class,cascade: ['remove'])]
  48.     private Collection $certifElearnings;
  49.     #[ORM\OneToMany(mappedBy'formation'targetEntityEvaluationElearning::class,cascade: ['remove'])]
  50.     private Collection $evaluationElearnings;
  51.     #[ORM\OneToMany(mappedBy'formation'targetEntityPackItem::class)]
  52.     private Collection $packItems;
  53.     #[ORM\OneToMany(mappedBy'formation'targetEntityChatFormation::class)]
  54.     private Collection $chatFormations;
  55.     public function __construct()
  56.     {
  57.         $this->videoElearnings = new ArrayCollection();
  58.         $this->commandeFormations = new ArrayCollection();
  59.         $this->sectionElearnings = new ArrayCollection();
  60.         $this->temoignageElearnings = new ArrayCollection();
  61.         $this->certifElearnings = new ArrayCollection();
  62.         $this->evaluationElearnings = new ArrayCollection();
  63.         $this->packItems = new ArrayCollection();
  64.         $this->chatFormations = new ArrayCollection();
  65.     }
  66.     public function getId(): ?int
  67.     {
  68.         return $this->id;
  69.     }
  70.     public function getTitre(): ?string
  71.     {
  72.         return $this->titre;
  73.     }
  74.     public function setTitre(?string $titre): self
  75.     {
  76.         $this->titre $titre;
  77.         return $this;
  78.     }
  79.     public function getDescription(): ?string
  80.     {
  81.         return $this->description;
  82.     }
  83.     public function setDescription(?string $description): self
  84.     {
  85.         $this->description $description;
  86.         return $this;
  87.     }
  88.     public function getProgramme(): ?string
  89.     {
  90.         return $this->programme;
  91.     }
  92.     public function setProgramme(?string $programme): self
  93.     {
  94.         $this->programme $programme;
  95.         return $this;
  96.     }
  97.     public function getAffiche(): ?string
  98.     {
  99.         return $this->affiche;
  100.     }
  101.     public function setAffiche(?string $affiche): self
  102.     {
  103.         $this->affiche $affiche;
  104.         return $this;
  105.     }
  106.     public function getPrix(): ?string
  107.     {
  108.         return $this->prix;
  109.     }
  110.     public function setPrix(?string $prix): self
  111.     {
  112.         $this->prix $prix;
  113.         return $this;
  114.     }
  115.     public function isIsPromo(): ?bool
  116.     {
  117.         return $this->isPromo;
  118.     }
  119.     public function setIsPromo(?bool $isPromo): self
  120.     {
  121.         $this->isPromo $isPromo;
  122.         return $this;
  123.     }
  124.     public function getPrixPromo(): ?string
  125.     {
  126.         return $this->prixPromo;
  127.     }
  128.     public function setPrixPromo(?string $prixPromo): self
  129.     {
  130.         $this->prixPromo $prixPromo;
  131.         return $this;
  132.     }
  133.     public function getCategorie(): ?CategorieElearning
  134.     {
  135.         return $this->categorie;
  136.     }
  137.     public function setCategorie(?CategorieElearning $categorie): self
  138.     {
  139.         $this->categorie $categorie;
  140.         return $this;
  141.     }
  142.     public function getFormateur(): ?User
  143.     {
  144.         return $this->formateur;
  145.     }
  146.     public function setFormateur(?User $formateur): self
  147.     {
  148.         $this->formateur $formateur;
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return Collection<int, VideoElearning>
  153.      */
  154.     public function getVideoElearnings(): Collection
  155.     {
  156.         return $this->videoElearnings;
  157.     }
  158.     public function addVideoElearning(VideoElearning $videoElearning): self
  159.     {
  160.         if (!$this->videoElearnings->contains($videoElearning)) {
  161.             $this->videoElearnings->add($videoElearning);
  162.             $videoElearning->setFormation($this);
  163.         }
  164.         return $this;
  165.     }
  166.     public function removeVideoElearning(VideoElearning $videoElearning): self
  167.     {
  168.         if ($this->videoElearnings->removeElement($videoElearning)) {
  169.             // set the owning side to null (unless already changed)
  170.             if ($videoElearning->getFormation() === $this) {
  171.                 $videoElearning->setFormation(null);
  172.             }
  173.         }
  174.         return $this;
  175.     }
  176.     public function getSlug(): ?string
  177.     {
  178.         return $this->slug;
  179.     }
  180.     public function setSlug(?string $slug): self
  181.     {
  182.         $this->slug $slug;
  183.         return $this;
  184.     }
  185.     /**
  186.      * @return Collection<int, CommandeFormation>
  187.      */
  188.     public function getCommandeFormations(): Collection
  189.     {
  190.         return $this->commandeFormations;
  191.     }
  192.     public function addCommandeFormation(CommandeFormation $commandeFormation): self
  193.     {
  194.         if (!$this->commandeFormations->contains($commandeFormation)) {
  195.             $this->commandeFormations->add($commandeFormation);
  196.             $commandeFormation->setFormation($this);
  197.         }
  198.         return $this;
  199.     }
  200.     public function removeCommandeFormation(CommandeFormation $commandeFormation): self
  201.     {
  202.         if ($this->commandeFormations->removeElement($commandeFormation)) {
  203.             // set the owning side to null (unless already changed)
  204.             if ($commandeFormation->getFormation() === $this) {
  205.                 $commandeFormation->setFormation(null);
  206.             }
  207.         }
  208.         return $this;
  209.     }
  210.     public function getVideo(): ?string
  211.     {
  212.         return $this->video;
  213.     }
  214.     public function setVideo(?string $video): self
  215.     {
  216.         $this->video $video;
  217.         return $this;
  218.     }
  219.     /**
  220.      * @return Collection<int, SectionElearning>
  221.      */
  222.     public function getSectionElearnings(): Collection
  223.     {
  224.         return $this->sectionElearnings;
  225.     }
  226.     public function addSectionElearning(SectionElearning $sectionElearning): self
  227.     {
  228.         if (!$this->sectionElearnings->contains($sectionElearning)) {
  229.             $this->sectionElearnings->add($sectionElearning);
  230.             $sectionElearning->setFormation($this);
  231.         }
  232.         return $this;
  233.     }
  234.     public function removeSectionElearning(SectionElearning $sectionElearning): self
  235.     {
  236.         if ($this->sectionElearnings->removeElement($sectionElearning)) {
  237.             // set the owning side to null (unless already changed)
  238.             if ($sectionElearning->getFormation() === $this) {
  239.                 $sectionElearning->setFormation(null);
  240.             }
  241.         }
  242.         return $this;
  243.     }
  244.     /**
  245.      * @return Collection<int, TemoignageElearning>
  246.      */
  247.     public function getTemoignageElearnings(): Collection
  248.     {
  249.         return $this->temoignageElearnings;
  250.     }
  251.     public function addTemoignageElearning(TemoignageElearning $temoignageElearning): self
  252.     {
  253.         if (!$this->temoignageElearnings->contains($temoignageElearning)) {
  254.             $this->temoignageElearnings->add($temoignageElearning);
  255.             $temoignageElearning->setFormation($this);
  256.         }
  257.         return $this;
  258.     }
  259.     public function removeTemoignageElearning(TemoignageElearning $temoignageElearning): self
  260.     {
  261.         if ($this->temoignageElearnings->removeElement($temoignageElearning)) {
  262.             // set the owning side to null (unless already changed)
  263.             if ($temoignageElearning->getFormation() === $this) {
  264.                 $temoignageElearning->setFormation(null);
  265.             }
  266.         }
  267.         return $this;
  268.     }
  269.     /**
  270.      * @return Collection<int, CertifElearning>
  271.      */
  272.     public function getCertifElearnings(): Collection
  273.     {
  274.         return $this->certifElearnings;
  275.     }
  276.     public function addCertifElearning(CertifElearning $certifElearning): self
  277.     {
  278.         if (!$this->certifElearnings->contains($certifElearning)) {
  279.             $this->certifElearnings->add($certifElearning);
  280.             $certifElearning->setFormation($this);
  281.         }
  282.         return $this;
  283.     }
  284.     public function removeCertifElearning(CertifElearning $certifElearning): self
  285.     {
  286.         if ($this->certifElearnings->removeElement($certifElearning)) {
  287.             // set the owning side to null (unless already changed)
  288.             if ($certifElearning->getFormation() === $this) {
  289.                 $certifElearning->setFormation(null);
  290.             }
  291.         }
  292.         return $this;
  293.     }
  294.     /**
  295.      * @return Collection<int, EvaluationElearning>
  296.      */
  297.     public function getEvaluationElearnings(): Collection
  298.     {
  299.         return $this->evaluationElearnings;
  300.     }
  301.     public function addEvaluationElearning(EvaluationElearning $evaluationElearning): self
  302.     {
  303.         if (!$this->evaluationElearnings->contains($evaluationElearning)) {
  304.             $this->evaluationElearnings->add($evaluationElearning);
  305.             $evaluationElearning->setFormation($this);
  306.         }
  307.         return $this;
  308.     }
  309.     public function removeEvaluationElearning(EvaluationElearning $evaluationElearning): self
  310.     {
  311.         if ($this->evaluationElearnings->removeElement($evaluationElearning)) {
  312.             // set the owning side to null (unless already changed)
  313.             if ($evaluationElearning->getFormation() === $this) {
  314.                 $evaluationElearning->setFormation(null);
  315.             }
  316.         }
  317.         return $this;
  318.     }
  319.     /**
  320.      * @return Collection<int, PackItem>
  321.      */
  322.     public function getPackItems(): Collection
  323.     {
  324.         return $this->packItems;
  325.     }
  326.     public function addPackItem(PackItem $packItem): self
  327.     {
  328.         if (!$this->packItems->contains($packItem)) {
  329.             $this->packItems->add($packItem);
  330.             $packItem->setFormation($this);
  331.         }
  332.         return $this;
  333.     }
  334.     public function removePackItem(PackItem $packItem): self
  335.     {
  336.         if ($this->packItems->removeElement($packItem)) {
  337.             // set the owning side to null (unless already changed)
  338.             if ($packItem->getFormation() === $this) {
  339.                 $packItem->setFormation(null);
  340.             }
  341.         }
  342.         return $this;
  343.     }
  344.     /**
  345.      * @return Collection<int, ChatFormation>
  346.      */
  347.     public function getChatFormations(): Collection
  348.     {
  349.         return $this->chatFormations;
  350.     }
  351.     public function addChatFormation(ChatFormation $chatFormation): self
  352.     {
  353.         if (!$this->chatFormations->contains($chatFormation)) {
  354.             $this->chatFormations->add($chatFormation);
  355.             $chatFormation->setFormation($this);
  356.         }
  357.         return $this;
  358.     }
  359.     public function removeChatFormation(ChatFormation $chatFormation): self
  360.     {
  361.         if ($this->chatFormations->removeElement($chatFormation)) {
  362.             // set the owning side to null (unless already changed)
  363.             if ($chatFormation->getFormation() === $this) {
  364.                 $chatFormation->setFormation(null);
  365.             }
  366.         }
  367.         return $this;
  368.     }
  369. }