src/Entity/ChecklistClotureSession.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChecklistClotureSessionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ChecklistClotureSessionRepository::class)
  9.  */
  10. class ChecklistClotureSession
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.      
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $longwording;
  23.     /**
  24.      * @ORM\ManyToMany(targetEntity=Formation::class, mappedBy="requis")
  25.      */
  26.     private $formations;
  27.     public function __construct()
  28.     {
  29.       
  30.         $this->formations = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getLongwording(): ?string
  37.     {
  38.         return $this->longwording;
  39.     }
  40.     public function setLongwording(string $longwording): self
  41.     {
  42.         $this->longwording $longwording;
  43.         return $this;
  44.     }
  45.     
  46.     /**
  47.      * @return Collection<int, Formation>
  48.      */
  49.     public function getFormations(): Collection
  50.     {
  51.         return $this->formations;
  52.     }
  53.     public function addFormation(Formation $formation): self
  54.     {
  55.         if (!$this->formations->contains($formation)) {
  56.             $this->formations[] = $formation;
  57.             $formation->addRequi($this);
  58.         }
  59.         return $this;
  60.     }
  61.     public function removeFormation(Formation $formation): self
  62.     {
  63.         if ($this->formations->removeElement($formation)) {
  64.             $formation->removeRequi($this);
  65.         }
  66.         return $this;
  67.     }
  68. }