<?phpnamespace App\Entity;use App\Repository\ProgressionRepository;use DateTimeInterface;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProgressionRepository::class)]class Progression{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $libelle = null; #[ORM\ManyToMany(targetEntity: BlocHeure::class)] private Collection $refBlocHeure; #[ORM\ManyToMany(targetEntity: PeriodeCle::class)] private Collection $refPeriodeCle; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?DateTimeInterface $dateDebut = null; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?DateTimeInterface $dateFin = null; #[ORM\Column] private ?bool $estGenere = false; #[ORM\OneToMany(mappedBy: 'refProgression', targetEntity: ProgressionDetail::class, orphanRemoval: true)] private Collection $refProgressionDetails; public function __construct() { $this->refBlocHeure = new ArrayCollection(); $this->refPeriodeCle = new ArrayCollection(); $this->refProgressionDetails = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLibelle(): ?string { return $this->libelle; } public function setLibelle(string $libelle): self { $this->libelle = $libelle; return $this; } /** * @return Collection<int, BlocHeure> */ public function getRefBlocHeure(): Collection { return $this->refBlocHeure; } public function addRefBlocHeure(BlocHeure $refBlocHeure): self { if (!$this->refBlocHeure->contains($refBlocHeure)) { $this->refBlocHeure->add($refBlocHeure); } return $this; } public function removeRefBlocHeure(BlocHeure $refBlocHeure): self { $this->refBlocHeure->removeElement($refBlocHeure); return $this; } /** * @return Collection<int, PeriodeCle> */ public function getRefPeriodeCle(): Collection { return $this->refPeriodeCle; } public function addRefPeriodeCle(PeriodeCle $refPeriodeCle): self { if (!$this->refPeriodeCle->contains($refPeriodeCle)) { $this->refPeriodeCle->add($refPeriodeCle); } return $this; } public function removeRefPeriodeCle(PeriodeCle $refPeriodeCle): self { $this->refPeriodeCle->removeElement($refPeriodeCle); return $this; } public function __toString(): string { return $this->getLibelle(); // TODO: Implement __toString() method. } public function getDateDebut(): ?DateTimeInterface { return $this->dateDebut; } public function setDateDebut(DateTimeInterface $dateDebut): self { $this->dateDebut = $dateDebut; return $this; } public function getDateFin(): ?DateTimeInterface { return $this->dateFin; } public function setDateFin(DateTimeInterface $dateFin): self { $this->dateFin = $dateFin; return $this; } public function isEstGenere(): ?bool { return $this->estGenere; } public function setEstGenere(bool $estGenere): self { $this->estGenere = $estGenere; return $this; } /** * @return Collection<int, ProgressionDetail> */ public function getRefProgressionDetails(): Collection { return $this->refProgressionDetails; } public function addRefProgressionDetail(ProgressionDetail $refProgressionDetail): self { if (!$this->refProgressionDetails->contains($refProgressionDetail)) { $this->refProgressionDetails->add($refProgressionDetail); $refProgressionDetail->setRefProgression($this); } return $this; } public function removeRefProgressionDetail(ProgressionDetail $refProgressionDetail): self { if ($this->refProgressionDetails->removeElement($refProgressionDetail)) { // set the owning side to null (unless already changed) if ($refProgressionDetail->getRefProgression() === $this) { $refProgressionDetail->setRefProgression(null); } } return $this; }}