src/Entity/TypeSeoPage.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeSeoPageRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassTypeSeoPageRepository::class)]
  8. class TypeSeoPage
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $type;
  16.     #[ORM\OneToMany(targetEntitySeoPage::class, mappedBy'type'orphanRemovaltrue)]
  17.     private $seoPages;
  18.     #[ORM\OneToMany(targetEntitySeoPageClient::class, mappedBy'type')]
  19.     private $seoPageClients;
  20.     #[ORM\Column(type'string'length150nullabletrue)]
  21.     private $urlParameter;
  22.     public function __construct()
  23.     {
  24.         $this->seoPages = new ArrayCollection();
  25.         $this->seoPageClients = new ArrayCollection();
  26.     }
  27.    
  28.     
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getType(): ?string
  34.     {
  35.         return $this->type;
  36.     }
  37.     public function setType(string $type): self
  38.     {
  39.         $this->type $type;
  40.         return $this;
  41.     }
  42.     /**
  43.      * @return Collection|SeoPage[]
  44.      */
  45.     public function getSeoPages(): Collection
  46.     {
  47.         return $this->seoPages;
  48.     }
  49.     public function addSeoPage(SeoPage $seoPage): self
  50.     {
  51.         if (!$this->seoPages->contains($seoPage)) {
  52.             $this->seoPages[] = $seoPage;
  53.             $seoPage->setType($this);
  54.         }
  55.         return $this;
  56.     }
  57.     public function removeSeoPage(SeoPage $seoPage): self
  58.     {
  59.         if ($this->seoPages->removeElement($seoPage)) {
  60.             // set the owning side to null (unless already changed)
  61.             if ($seoPage->getType() === $this) {
  62.                 $seoPage->setType(null);
  63.             }
  64.         }
  65.         return $this;
  66.     }
  67.     /**
  68.      * @return Collection|SeoPageClient[]
  69.      */
  70.     public function getSeoPageClients(): Collection
  71.     {
  72.         return $this->seoPageClients;
  73.     }
  74.     public function addSeoPageClient(SeoPageClient $seoPageClient): self
  75.     {
  76.         if (!$this->seoPageClients->contains($seoPageClient)) {
  77.             $this->seoPageClients[] = $seoPageClient;
  78.             $seoPageClient->setType($this);
  79.         }
  80.         return $this;
  81.     }
  82.     public function removeSeoPageClient(SeoPageClient $seoPageClient): self
  83.     {
  84.         if ($this->seoPageClients->removeElement($seoPageClient)) {
  85.             // set the owning side to null (unless already changed)
  86.             if ($seoPageClient->getType() === $this) {
  87.                 $seoPageClient->setType(null);
  88.             }
  89.         }
  90.         return $this;
  91.     }
  92.     public function getUrlParameter(): ?string
  93.     {
  94.         return $this->urlParameter;
  95.     }
  96.     public function setUrlParameter(?string $urlParameter): self
  97.     {
  98.         $this->urlParameter $urlParameter;
  99.         return $this;
  100.     }
  101.   
  102.    
  103. }