src/Entity/SeoIndustry.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Item\ItemCategory;
  4. use App\Entity\Traits\IdTrait;
  5. use App\Repository\SeoIndustryRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity(repositoryClass=SeoIndustryRepository::class)
  11.  */
  12. class SeoIndustry
  13. {
  14.     use IdTrait;
  15.     /**
  16.      * @ORM\Column(type="text", nullable=true)
  17.      */
  18.     private ?string $seoRightBlockPl;
  19.     /**
  20.      * @ORM\Column(type="text", nullable=true)
  21.      */
  22.     private ?string $seoLeftBlockPl;
  23.     /**
  24.      * @ORM\Column(type="text", nullable=true)
  25.      */
  26.     private ?string $seoRightBlockEn;
  27.     /**
  28.      * @ORM\Column(type="text", nullable=true)
  29.      */
  30.     private ?string $seoLeftBlockEn;
  31.     /**
  32.      * @ORM\OneToMany(targetEntity=ItemCategory::class, mappedBy="seoIndustry", cascade={"persist", "remove"})
  33.      */
  34.     private $industry;
  35.     /**
  36.      * @ORM\Column(type="string", nullable=true)
  37.      */
  38.     private $id_industry;
  39.     public function __construct()
  40.     {
  41.         $this->industry = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     /**
  48.      * @return string|null
  49.      */
  50.     public function getSeoRightBlockPl(): ?string
  51.     {
  52.         return $this->seoRightBlockPl;
  53.     }
  54.     /**
  55.      * @param string|null $seoRightBlockPl
  56.      */
  57.     public function setSeoRightBlockPl(?string $seoRightBlockPl): self
  58.     {
  59.         $this->seoRightBlockPl = $seoRightBlockPl;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return string|null
  64.      */
  65.     public function getSeoLeftBlockPl(): ?string
  66.     {
  67.         return $this->seoLeftBlockPl;
  68.     }
  69.     /**
  70.      * @param string|null $seoLeftBlockPl
  71.      */
  72.     public function setSeoLeftBlockPl(?string $seoLeftBlockPl): self
  73.     {
  74.         $this->seoLeftBlockPl = $seoLeftBlockPl;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return string|null
  79.      */
  80.     public function getSeoRightBlockEn(): ?string
  81.     {
  82.         return $this->seoRightBlockEn;
  83.     }
  84.     /**
  85.      * @param string|null $seoRightBlockEn
  86.      */
  87.     public function setSeoRightBlockEn(?string $seoRightBlockEn): self
  88.     {
  89.         $this->seoRightBlockEn = $seoRightBlockEn;
  90.         return $this;
  91.     }
  92.     /**
  93.      * @return string|null
  94.      */
  95.     public function getSeoLeftBlockEn(): ?string
  96.     {
  97.         return $this->seoLeftBlockEn;
  98.     }
  99.     /**
  100.      * @param string|null $seoLeftBlockEn
  101.      */
  102.     public function setSeoLeftBlockEn(?string $seoLeftBlockEn): self
  103.     {
  104.         $this->seoLeftBlockEn = $seoLeftBlockEn;
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return Collection|ItemCategory[]
  109.      */
  110.     public function getIndustry(): ?Collection
  111.     {
  112.         return $this->industry;
  113.     }
  114.     public function addIndustry(ItemCategory $itemCategory): self
  115.     {
  116.         if(!$this->industry->contains($itemCategory))
  117.         {
  118.             $this->industry[] = $itemCategory;
  119.             $itemCategory->setSeoIndustry($this);
  120.         }
  121.         return $this;
  122.     }
  123.     public function removeIndustry(ItemCategory $itemCategory): self
  124.     {
  125.         if($this->industry->contains($itemCategory))
  126.         {
  127.             $this->industry->removeElement($itemCategory);
  128.             if($itemCategory->getSeoIndustry() === $this)
  129.             {
  130.                 $itemCategory->setSeoIndustry(null);
  131.             }
  132.         }
  133.         return $this;
  134.     }
  135.     public function getIdIndustry(): ?string
  136.     {
  137.         return $this->id_industry;
  138.     }
  139.     public function setIdIndustry(?string $id_industry): self
  140.     {
  141.         $this->id_industry = $id_industry;
  142.         return $this;
  143.     }
  144. }