src/Entity/VideoElearning.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VideoElearningRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassVideoElearningRepository::class)]
  9. class VideoElearning
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $titre null;
  17.     #[ORM\ManyToOne(inversedBy'videoElearnings')]
  18.     private ?FormationElearning $formation null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $nbminute null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $idvideo null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $embed null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $date null;
  27.     #[ORM\OneToMany(mappedBy'video'targetEntityCommentElearning::class)]
  28.     private Collection $commentElearnings;
  29.     public function __construct()
  30.     {
  31.         $this->commentElearnings = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getTitre(): ?string
  38.     {
  39.         return $this->titre;
  40.     }
  41.     public function setTitre(?string $titre): self
  42.     {
  43.         $this->titre $titre;
  44.         return $this;
  45.     }
  46.     public function getFormation(): ?FormationElearning
  47.     {
  48.         return $this->formation;
  49.     }
  50.     public function setFormation(?FormationElearning $formation): self
  51.     {
  52.         $this->formation $formation;
  53.         return $this;
  54.     }
  55.     public function getNbminute(): ?string
  56.     {
  57.         return $this->nbminute;
  58.     }
  59.     public function setNbminute(?string $nbminute): self
  60.     {
  61.         $this->nbminute $nbminute;
  62.         return $this;
  63.     }
  64.     public function getIdvideo(): ?string
  65.     {
  66.         return $this->idvideo;
  67.     }
  68.     public function setIdvideo(?string $idvideo): self
  69.     {
  70.         $this->idvideo $idvideo;
  71.         return $this;
  72.     }
  73.     public function getEmbed(): ?string
  74.     {
  75.         return $this->embed;
  76.     }
  77.     public function setEmbed(?string $embed): self
  78.     {
  79.         $this->embed $embed;
  80.         return $this;
  81.     }
  82.     public function getDate(): ?\DateTimeInterface
  83.     {
  84.         return $this->date;
  85.     }
  86.     public function setDate(?\DateTimeInterface $date): self
  87.     {
  88.         $this->date $date;
  89.         return $this;
  90.     }
  91.     /**
  92.      * @return Collection<int, CommentElearning>
  93.      */
  94.     public function getCommentElearnings(): Collection
  95.     {
  96.         return $this->commentElearnings;
  97.     }
  98.     public function addCommentElearning(CommentElearning $commentElearning): self
  99.     {
  100.         if (!$this->commentElearnings->contains($commentElearning)) {
  101.             $this->commentElearnings->add($commentElearning);
  102.             $commentElearning->setVideo($this);
  103.         }
  104.         return $this;
  105.     }
  106.     public function removeCommentElearning(CommentElearning $commentElearning): self
  107.     {
  108.         if ($this->commentElearnings->removeElement($commentElearning)) {
  109.             // set the owning side to null (unless already changed)
  110.             if ($commentElearning->getVideo() === $this) {
  111.                 $commentElearning->setVideo(null);
  112.             }
  113.         }
  114.         return $this;
  115.     }
  116. }