<?php
namespace App\Entity;
use App\Repository\TypeGuideRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TypeGuideRepository::class)
*/
class TypeGuide
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=Guide::class, mappedBy="typeguide")
*/
private $guides;
/**
* @ORM\OneToMany(targetEntity=Faq::class, mappedBy="faq_type", orphanRemoval=true)
*/
private $faqs;
/**
* @ORM\OneToMany(targetEntity=Datedocument::class, mappedBy="typeplateform", orphanRemoval=true)
*/
private $datedocuments;
/**
* @ORM\OneToMany(targetEntity=Cgu::class, mappedBy="cgutype")
*/
private $cgus;
/**
* @ORM\OneToMany(targetEntity=Cgv::class, mappedBy="cgvtype", orphanRemoval=true)
*/
private $cgvs;
public function __construct()
{
$this->guides = new ArrayCollection();
$this->faqs = new ArrayCollection();
$this->datedocuments = new ArrayCollection();
$this->cgus = new ArrayCollection();
$this->cgvs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
/**
* @return Collection<int, Guide>
*/
public function getGuides(): Collection
{
return $this->guides;
}
public function addGuide(Guide $guide): self
{
if (!$this->guides->contains($guide)) {
$this->guides[] = $guide;
$guide->setTypeguide($this);
}
return $this;
}
public function removeGuide(Guide $guide): self
{
if ($this->guides->removeElement($guide)) {
// set the owning side to null (unless already changed)
if ($guide->getTypeguide() === $this) {
$guide->setTypeguide(null);
}
}
return $this;
}
/**
* @return Collection<int, Faq>
*/
public function getFaqs(): Collection
{
return $this->faqs;
}
public function addFaq(Faq $faq): self
{
if (!$this->faqs->contains($faq)) {
$this->faqs[] = $faq;
$faq->setFaqType($this);
}
return $this;
}
public function removeFaq(Faq $faq): self
{
if ($this->faqs->removeElement($faq)) {
// set the owning side to null (unless already changed)
if ($faq->getFaqType() === $this) {
$faq->setFaqType(null);
}
}
return $this;
}
/**
* @return Collection<int, Datedocument>
*/
public function getDatedocuments(): Collection
{
return $this->datedocuments;
}
public function addDatedocument(Datedocument $datedocument): self
{
if (!$this->datedocuments->contains($datedocument)) {
$this->datedocuments[] = $datedocument;
$datedocument->setTypeplateform($this);
}
return $this;
}
public function removeDatedocument(Datedocument $datedocument): self
{
if ($this->datedocuments->removeElement($datedocument)) {
// set the owning side to null (unless already changed)
if ($datedocument->getTypeplateform() === $this) {
$datedocument->setTypeplateform(null);
}
}
return $this;
}
/**
* @return Collection<int, Cgu>
*/
public function getCgus(): Collection
{
return $this->cgus;
}
public function addCgu(Cgu $cgu): self
{
if (!$this->cgus->contains($cgu)) {
$this->cgus[] = $cgu;
$cgu->setCgutype($this);
}
return $this;
}
public function removeCgu(Cgu $cgu): self
{
if ($this->cgus->removeElement($cgu)) {
// set the owning side to null (unless already changed)
if ($cgu->getCgutype() === $this) {
$cgu->setCgutype(null);
}
}
return $this;
}
/**
* @return Collection<int, Cgv>
*/
public function getCgvs(): Collection
{
return $this->cgvs;
}
public function addCgv(Cgv $cgv): self
{
if (!$this->cgvs->contains($cgv)) {
$this->cgvs[] = $cgv;
$cgv->setCgvtype($this);
}
return $this;
}
public function removeCgv(Cgv $cgv): self
{
if ($this->cgvs->removeElement($cgv)) {
// set the owning side to null (unless already changed)
if ($cgv->getCgvtype() === $this) {
$cgv->setCgvtype(null);
}
}
return $this;
}
}