src/Entity/TypeGuide.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeGuideRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeGuideRepository::class)
  9.  */
  10. class TypeGuide
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $designation;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Guide::class, mappedBy="typeguide")
  24.      */
  25.     private $guides;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=Faq::class, mappedBy="faq_type", orphanRemoval=true)
  28.      */
  29.     private $faqs;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=Datedocument::class, mappedBy="typeplateform", orphanRemoval=true)
  32.      */
  33.     private $datedocuments;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=Cgu::class, mappedBy="cgutype")
  36.      */
  37.     private $cgus;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=Cgv::class, mappedBy="cgvtype", orphanRemoval=true)
  40.      */
  41.     private $cgvs;
  42.     public function __construct()
  43.     {
  44.         $this->guides = new ArrayCollection();
  45.         $this->faqs = new ArrayCollection();
  46.         $this->datedocuments = new ArrayCollection();
  47.         $this->cgus = new ArrayCollection();
  48.         $this->cgvs = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getDesignation(): ?string
  55.     {
  56.         return $this->designation;
  57.     }
  58.     public function setDesignation(string $designation): self
  59.     {
  60.         $this->designation $designation;
  61.         return $this;
  62.     }
  63.     /**
  64.      * @return Collection<int, Guide>
  65.      */
  66.     public function getGuides(): Collection
  67.     {
  68.         return $this->guides;
  69.     }
  70.     public function addGuide(Guide $guide): self
  71.     {
  72.         if (!$this->guides->contains($guide)) {
  73.             $this->guides[] = $guide;
  74.             $guide->setTypeguide($this);
  75.         }
  76.         return $this;
  77.     }
  78.     public function removeGuide(Guide $guide): self
  79.     {
  80.         if ($this->guides->removeElement($guide)) {
  81.             // set the owning side to null (unless already changed)
  82.             if ($guide->getTypeguide() === $this) {
  83.                 $guide->setTypeguide(null);
  84.             }
  85.         }
  86.         return $this;
  87.     }
  88.     /**
  89.      * @return Collection<int, Faq>
  90.      */
  91.     public function getFaqs(): Collection
  92.     {
  93.         return $this->faqs;
  94.     }
  95.     public function addFaq(Faq $faq): self
  96.     {
  97.         if (!$this->faqs->contains($faq)) {
  98.             $this->faqs[] = $faq;
  99.             $faq->setFaqType($this);
  100.         }
  101.         return $this;
  102.     }
  103.     public function removeFaq(Faq $faq): self
  104.     {
  105.         if ($this->faqs->removeElement($faq)) {
  106.             // set the owning side to null (unless already changed)
  107.             if ($faq->getFaqType() === $this) {
  108.                 $faq->setFaqType(null);
  109.             }
  110.         }
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection<int, Datedocument>
  115.      */
  116.     public function getDatedocuments(): Collection
  117.     {
  118.         return $this->datedocuments;
  119.     }
  120.     public function addDatedocument(Datedocument $datedocument): self
  121.     {
  122.         if (!$this->datedocuments->contains($datedocument)) {
  123.             $this->datedocuments[] = $datedocument;
  124.             $datedocument->setTypeplateform($this);
  125.         }
  126.         return $this;
  127.     }
  128.     public function removeDatedocument(Datedocument $datedocument): self
  129.     {
  130.         if ($this->datedocuments->removeElement($datedocument)) {
  131.             // set the owning side to null (unless already changed)
  132.             if ($datedocument->getTypeplateform() === $this) {
  133.                 $datedocument->setTypeplateform(null);
  134.             }
  135.         }
  136.         return $this;
  137.     }
  138.     /**
  139.      * @return Collection<int, Cgu>
  140.      */
  141.     public function getCgus(): Collection
  142.     {
  143.         return $this->cgus;
  144.     }
  145.     public function addCgu(Cgu $cgu): self
  146.     {
  147.         if (!$this->cgus->contains($cgu)) {
  148.             $this->cgus[] = $cgu;
  149.             $cgu->setCgutype($this);
  150.         }
  151.         return $this;
  152.     }
  153.     public function removeCgu(Cgu $cgu): self
  154.     {
  155.         if ($this->cgus->removeElement($cgu)) {
  156.             // set the owning side to null (unless already changed)
  157.             if ($cgu->getCgutype() === $this) {
  158.                 $cgu->setCgutype(null);
  159.             }
  160.         }
  161.         return $this;
  162.     }
  163.     /**
  164.      * @return Collection<int, Cgv>
  165.      */
  166.     public function getCgvs(): Collection
  167.     {
  168.         return $this->cgvs;
  169.     }
  170.     public function addCgv(Cgv $cgv): self
  171.     {
  172.         if (!$this->cgvs->contains($cgv)) {
  173.             $this->cgvs[] = $cgv;
  174.             $cgv->setCgvtype($this);
  175.         }
  176.         return $this;
  177.     }
  178.     public function removeCgv(Cgv $cgv): self
  179.     {
  180.         if ($this->cgvs->removeElement($cgv)) {
  181.             // set the owning side to null (unless already changed)
  182.             if ($cgv->getCgvtype() === $this) {
  183.                 $cgv->setCgvtype(null);
  184.             }
  185.         }
  186.         return $this;
  187.     }
  188. }