src/Entity/Progression.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProgressionRepository;
  4. use DateTimeInterface;
  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(repositoryClassProgressionRepository::class)]
  10. class Progression
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $libelle null;
  18.     #[ORM\ManyToMany(targetEntityBlocHeure::class)]
  19.     private Collection $refBlocHeure;
  20.     #[ORM\ManyToMany(targetEntityPeriodeCle::class)]
  21.     private Collection $refPeriodeCle;
  22.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  23.     private ?DateTimeInterface $dateDebut null;
  24.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  25.     private ?DateTimeInterface $dateFin null;
  26.     #[ORM\Column]
  27.     private ?bool $estGenere false;
  28.     #[ORM\OneToMany(mappedBy'refProgression'targetEntityProgressionDetail::class, orphanRemovaltrue)]
  29.     private Collection $refProgressionDetails;
  30.     public function __construct()
  31.     {
  32.         $this->refBlocHeure = new ArrayCollection();
  33.         $this->refPeriodeCle = new ArrayCollection();
  34.         $this->refProgressionDetails = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getLibelle(): ?string
  41.     {
  42.         return $this->libelle;
  43.     }
  44.     public function setLibelle(string $libelle): self
  45.     {
  46.         $this->libelle $libelle;
  47.         return $this;
  48.     }
  49.     /**
  50.      * @return Collection<int, BlocHeure>
  51.      */
  52.     public function getRefBlocHeure(): Collection
  53.     {
  54.         return $this->refBlocHeure;
  55.     }
  56.     public function addRefBlocHeure(BlocHeure $refBlocHeure): self
  57.     {
  58.         if (!$this->refBlocHeure->contains($refBlocHeure)) {
  59.             $this->refBlocHeure->add($refBlocHeure);
  60.         }
  61.         return $this;
  62.     }
  63.     public function removeRefBlocHeure(BlocHeure $refBlocHeure): self
  64.     {
  65.         $this->refBlocHeure->removeElement($refBlocHeure);
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection<int, PeriodeCle>
  70.      */
  71.     public function getRefPeriodeCle(): Collection
  72.     {
  73.         return $this->refPeriodeCle;
  74.     }
  75.     public function addRefPeriodeCle(PeriodeCle $refPeriodeCle): self
  76.     {
  77.         if (!$this->refPeriodeCle->contains($refPeriodeCle)) {
  78.             $this->refPeriodeCle->add($refPeriodeCle);
  79.         }
  80.         return $this;
  81.     }
  82.     public function removeRefPeriodeCle(PeriodeCle $refPeriodeCle): self
  83.     {
  84.         $this->refPeriodeCle->removeElement($refPeriodeCle);
  85.         return $this;
  86.     }
  87.     public function __toString(): string
  88.     {
  89.         return $this->getLibelle();
  90.         // TODO: Implement __toString() method.
  91.     }
  92.     public function getDateDebut(): ?DateTimeInterface
  93.     {
  94.         return $this->dateDebut;
  95.     }
  96.     public function setDateDebut(DateTimeInterface $dateDebut): self
  97.     {
  98.         $this->dateDebut $dateDebut;
  99.         return $this;
  100.     }
  101.     public function getDateFin(): ?DateTimeInterface
  102.     {
  103.         return $this->dateFin;
  104.     }
  105.     public function setDateFin(DateTimeInterface $dateFin): self
  106.     {
  107.         $this->dateFin $dateFin;
  108.         return $this;
  109.     }
  110.     public function isEstGenere(): ?bool
  111.     {
  112.         return $this->estGenere;
  113.     }
  114.     public function setEstGenere(bool $estGenere): self
  115.     {
  116.         $this->estGenere $estGenere;
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return Collection<int, ProgressionDetail>
  121.      */
  122.     public function getRefProgressionDetails(): Collection
  123.     {
  124.         return $this->refProgressionDetails;
  125.     }
  126.     public function addRefProgressionDetail(ProgressionDetail $refProgressionDetail): self
  127.     {
  128.         if (!$this->refProgressionDetails->contains($refProgressionDetail)) {
  129.             $this->refProgressionDetails->add($refProgressionDetail);
  130.             $refProgressionDetail->setRefProgression($this);
  131.         }
  132.         return $this;
  133.     }
  134.     public function removeRefProgressionDetail(ProgressionDetail $refProgressionDetail): self
  135.     {
  136.         if ($this->refProgressionDetails->removeElement($refProgressionDetail)) {
  137.             // set the owning side to null (unless already changed)
  138.             if ($refProgressionDetail->getRefProgression() === $this) {
  139.                 $refProgressionDetail->setRefProgression(null);
  140.             }
  141.         }
  142.         return $this;
  143.     }
  144. }