src/Entity/CentreType.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CentreTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CentreTypeRepository::class)
  9.  */
  10. class CentreType
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=10)
  20.      */
  21.     private $ct_denomination;
  22.     /**
  23.      * @ORM\Column(type="string", length=50)
  24.      */
  25.     private $ct_libele_public;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="centre_type")
  28.      */
  29.     private $rendezvouses;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=Ligne::class, mappedBy="centre_type")
  32.      */
  33.     private $lignes;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=TypeVehicule::class, mappedBy="tv_centre_type")
  36.      */
  37.     private $typeVehicules;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=ClientCompte::class, mappedBy="centre_type")
  40.      */
  41.     private $clientComptes;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=Centre::class, mappedBy="centre_type")
  44.      */
  45.     private $centres;
  46.     public function __construct()
  47.     {
  48.         $this->rendezvouses = new ArrayCollection();
  49.         $this->lignes = new ArrayCollection();
  50.         $this->typeVehicules = new ArrayCollection();
  51.         $this->clientComptes = new ArrayCollection();
  52.         $this->centres = new ArrayCollection();
  53.     }
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getCtDenomination(): ?string
  59.     {
  60.         return $this->ct_denomination;
  61.     }
  62.     public function setCtDenomination(string $ct_denomination): self
  63.     {
  64.         $this->ct_denomination $ct_denomination;
  65.         return $this;
  66.     }
  67.     public function getCtLibelePublic(): ?string
  68.     {
  69.         return $this->ct_libele_public;
  70.     }
  71.     public function setCtLibelePublic(string $ct_libele_public): self
  72.     {
  73.         $this->ct_libele_public $ct_libele_public;
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Collection<int, Rendezvous>
  78.      */
  79.     public function getRendezvouses(): Collection
  80.     {
  81.         return $this->rendezvouses;
  82.     }
  83.     public function addRendezvouse(Rendezvous $rendezvouse): self
  84.     {
  85.         if (!$this->rendezvouses->contains($rendezvouse)) {
  86.             $this->rendezvouses[] = $rendezvouse;
  87.             $rendezvouse->setCentreType($this);
  88.         }
  89.         return $this;
  90.     }
  91.     public function removeRendezvouse(Rendezvous $rendezvouse): self
  92.     {
  93.         if ($this->rendezvouses->removeElement($rendezvouse)) {
  94.             // set the owning side to null (unless already changed)
  95.             if ($rendezvouse->getCentreType() === $this) {
  96.                 $rendezvouse->setCentreType(null);
  97.             }
  98.         }
  99.         return $this;
  100.     }
  101.     /**
  102.      * @return Collection<int, Ligne>
  103.      */
  104.     public function getLignes(): Collection
  105.     {
  106.         return $this->lignes;
  107.     }
  108.     public function addLigne(Ligne $ligne): self
  109.     {
  110.         if (!$this->lignes->contains($ligne)) {
  111.             $this->lignes[] = $ligne;
  112.             $ligne->setCentreType($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeLigne(Ligne $ligne): self
  117.     {
  118.         if ($this->lignes->removeElement($ligne)) {
  119.             // set the owning side to null (unless already changed)
  120.             if ($ligne->getCentreType() === $this) {
  121.                 $ligne->setCentreType(null);
  122.             }
  123.         }
  124.         return $this;
  125.     }
  126.     /**
  127.      * @return Collection<int, TypeVehicule>
  128.      */
  129.     public function getTypeVehicules(): Collection
  130.     {
  131.         return $this->typeVehicules;
  132.     }
  133.     public function addTypeVehicule(TypeVehicule $typeVehicule): self
  134.     {
  135.         if (!$this->typeVehicules->contains($typeVehicule)) {
  136.             $this->typeVehicules[] = $typeVehicule;
  137.             $typeVehicule->setTvCentreType($this);
  138.         }
  139.         return $this;
  140.     }
  141.     public function removeTypeVehicule(TypeVehicule $typeVehicule): self
  142.     {
  143.         if ($this->typeVehicules->removeElement($typeVehicule)) {
  144.             // set the owning side to null (unless already changed)
  145.             if ($typeVehicule->getTvCentreType() === $this) {
  146.                 $typeVehicule->setTvCentreType(null);
  147.             }
  148.         }
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return Collection<int, ClientCompte>
  153.      */
  154.     public function getClientComptes(): Collection
  155.     {
  156.         return $this->clientComptes;
  157.     }
  158.     public function addClientCompte(ClientCompte $clientCompte): self
  159.     {
  160.         if (!$this->clientComptes->contains($clientCompte)) {
  161.             $this->clientComptes[] = $clientCompte;
  162.             $clientCompte->setCentreType($this);
  163.         }
  164.         return $this;
  165.     }
  166.     public function removeClientCompte(ClientCompte $clientCompte): self
  167.     {
  168.         if ($this->clientComptes->removeElement($clientCompte)) {
  169.             // set the owning side to null (unless already changed)
  170.             if ($clientCompte->getCentreType() === $this) {
  171.                 $clientCompte->setCentreType(null);
  172.             }
  173.         }
  174.         return $this;
  175.     }
  176.     /**
  177.      * @return Collection<int, Centre>
  178.      */
  179.     public function getCentres(): Collection
  180.     {
  181.         return $this->centres;
  182.     }
  183.     public function addCentre(Centre $centre): self
  184.     {
  185.         if (!$this->centres->contains($centre)) {
  186.             $this->centres[] = $centre;
  187.             $centre->setCentreType($this);
  188.         }
  189.         return $this;
  190.     }
  191.     public function removeCentre(Centre $centre): self
  192.     {
  193.         if ($this->centres->removeElement($centre)) {
  194.             // set the owning side to null (unless already changed)
  195.             if ($centre->getCentreType() === $this) {
  196.                 $centre->setCentreType(null);
  197.             }
  198.         }
  199.         return $this;
  200.     }
  201. }