<?phpnamespace App\Entity;use App\Repository\CanalRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=CanalRepository::class) */class Canal{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $wording; /** * @ORM\OneToMany(targetEntity=DemandeByCanal::class, mappedBy="canal") */ private $demandeByCanals; /** * @ORM\OneToMany(targetEntity=DemandePro::class, mappedBy="canal") */ private $demandePros; public function __construct() { $this->demandeByCanals = new ArrayCollection(); $this->demandePros = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getWording(): ?string { return $this->wording; } public function setWording(string $wording): self { $this->wording = $wording; return $this; } /** * @return Collection<int, DemandeByCanal> */ public function getDemandeByCanals(): Collection { return $this->demandeByCanals; } public function addDemandeByCanal(DemandeByCanal $demandeByCanal): self { if (!$this->demandeByCanals->contains($demandeByCanal)) { $this->demandeByCanals[] = $demandeByCanal; $demandeByCanal->setCanal($this); } return $this; } public function removeDemandeByCanal(DemandeByCanal $demandeByCanal): self { if ($this->demandeByCanals->removeElement($demandeByCanal)) { // set the owning side to null (unless already changed) if ($demandeByCanal->getCanal() === $this) { $demandeByCanal->setCanal(null); } } return $this; } /** * @return Collection<int, DemandePro> */ public function getDemandePros(): Collection { return $this->demandePros; } public function addDemandePro(DemandePro $demandePro): self { if (!$this->demandePros->contains($demandePro)) { $this->demandePros[] = $demandePro; $demandePro->setCanal($this); } return $this; } public function removeDemandePro(DemandePro $demandePro): self { if ($this->demandePros->removeElement($demandePro)) { // set the owning side to null (unless already changed) if ($demandePro->getCanal() === $this) { $demandePro->setCanal(null); } } return $this; }}