src/Entity/Gos/ContactSegmentation.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\ContactSegmentationRepository")
  8.  */
  9. class ContactSegmentation
  10. {
  11.     /**
  12.     * @ORM\Id
  13.     * @ORM\GeneratedValue
  14.     * @ORM\Column(type="integer")
  15.     */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $salesmanagoTag;
  25.     /**
  26.      * @ORM\ManyToMany(targetEntity=ContactSegmentationAction::class, mappedBy="contactSegmentations")
  27.      */
  28.     private $contactSegmentationActions;
  29.     /**
  30.      * @ORM\ManyToMany(targetEntity=Product::class, mappedBy="contactSegmentations")
  31.      */
  32.     private $products;
  33.     /**
  34.      * @ORM\ManyToMany(targetEntity=PortalSettings::class, mappedBy="contactSegmentations")
  35.      */
  36.     private $portalSettings;
  37.     public function __construct()
  38.     {
  39.         $this->contactSegmentationActions = new ArrayCollection();
  40.         $this->products = new ArrayCollection();
  41.         $this->portalSettings = new ArrayCollection();
  42.     }
  43.     public function __toString()
  44.     {
  45.         return $this->name;
  46.     }
  47.     /**
  48.      * @return mixed
  49.      */
  50.     public function getId()
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName($name): void
  59.     {
  60.         $this->name $name;
  61.     }
  62.     public function getSalesmanagoTag(): ?string
  63.     {
  64.         return $this->salesmanagoTag;
  65.     }
  66.     public function setSalesmanagoTag($salesmanagoTag): void
  67.     {
  68.         $this->salesmanagoTag $salesmanagoTag;
  69.     }
  70.     /**
  71.      * @return Collection|ContactSegmentationAction[]
  72.      */
  73.     public function getContactSegmentationActions(): Collection
  74.     {
  75.         return $this->contactSegmentationActions;
  76.     }
  77.     public function addContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self
  78.     {
  79.         if (!$this->contactSegmentationActions->contains($contactSegmentationAction)) {
  80.             $this->contactSegmentationActions[] = $contactSegmentationAction;
  81.             $contactSegmentationAction->addContactSegmentation($this);
  82.         }
  83.         return $this;
  84.     }
  85.     public function removeContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self
  86.     {
  87.         if ($this->contactSegmentationActions->contains($contactSegmentationAction)) {
  88.             $this->contactSegmentationActions->removeElement($contactSegmentationAction);
  89.             $contactSegmentationAction->removeContactSegmentation($this);
  90.         }
  91.         return $this;
  92.     }
  93.     public function getProducts(): Collection
  94.     {
  95.         return $this->products;
  96.     }
  97.     public function addProduct(Product $product): self
  98.     {
  99.         if (!$this->products->contains($product)) {
  100.             $this->products[] = $product;
  101.             $product->addContactSegmentation($this);
  102.         }
  103.         return $this;
  104.     }
  105.     public function removeProduct(Product $product): self
  106.     {
  107.         if ($this->products->contains($product)) {
  108.             $this->products->removeElement($product);
  109.             $product->removeContactSegmentation($this);
  110.         }
  111.         return $this;
  112.     }
  113.     public function getPortalSettings(): Collection
  114.     {
  115.         return $this->portalSettings;
  116.     }
  117.     public function addPortalSetting(PortalSettings $portalSettings): self
  118.     {
  119.         if (!$this->portalSettings->contains($portalSettings)) {
  120.             $this->portalSettings[] = $portalSettings;
  121.             $portalSettings->addContactSegmentation($this);
  122.         }
  123.         return $this;
  124.     }
  125.     public function removePortalSetting(PortalSettings $portalSettings): self
  126.     {
  127.         if ($this->portalSettings->contains($portalSettings)) {
  128.             $this->portalSettings->removeElement($portalSettings);
  129.             $portalSettings->removeContactSegmentation($this);
  130.         }
  131.         return $this;
  132.     }
  133. }