<?php
namespace App\Entity;
use App\Repository\ChecklistClotureSessionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ChecklistClotureSessionRepository::class)
*/
class ChecklistClotureSession
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $longwording;
/**
* @ORM\ManyToMany(targetEntity=Formation::class, mappedBy="requis")
*/
private $formations;
public function __construct()
{
$this->formations = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLongwording(): ?string
{
return $this->longwording;
}
public function setLongwording(string $longwording): self
{
$this->longwording = $longwording;
return $this;
}
/**
* @return Collection<int, Formation>
*/
public function getFormations(): Collection
{
return $this->formations;
}
public function addFormation(Formation $formation): self
{
if (!$this->formations->contains($formation)) {
$this->formations[] = $formation;
$formation->addRequi($this);
}
return $this;
}
public function removeFormation(Formation $formation): self
{
if ($this->formations->removeElement($formation)) {
$formation->removeRequi($this);
}
return $this;
}
}