<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\ContactSegmentationRepository") */class ContactSegmentation{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="string", length=255) */ private $salesmanagoTag; /** * @ORM\ManyToMany(targetEntity=ContactSegmentationAction::class, mappedBy="contactSegmentations") */ private $contactSegmentationActions; /** * @ORM\ManyToMany(targetEntity=Product::class, mappedBy="contactSegmentations") */ private $products; /** * @ORM\ManyToMany(targetEntity=PortalSettings::class, mappedBy="contactSegmentations") */ private $portalSettings; public function __construct() { $this->contactSegmentationActions = new ArrayCollection(); $this->products = new ArrayCollection(); $this->portalSettings = new ArrayCollection(); } public function __toString() { return $this->name; } /** * @return mixed */ public function getId() { return $this->id; } public function getName(): ?string { return $this->name; } public function setName($name): void { $this->name = $name; } public function getSalesmanagoTag(): ?string { return $this->salesmanagoTag; } public function setSalesmanagoTag($salesmanagoTag): void { $this->salesmanagoTag = $salesmanagoTag; } /** * @return Collection|ContactSegmentationAction[] */ public function getContactSegmentationActions(): Collection { return $this->contactSegmentationActions; } public function addContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self { if (!$this->contactSegmentationActions->contains($contactSegmentationAction)) { $this->contactSegmentationActions[] = $contactSegmentationAction; $contactSegmentationAction->addContactSegmentation($this); } return $this; } public function removeContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self { if ($this->contactSegmentationActions->contains($contactSegmentationAction)) { $this->contactSegmentationActions->removeElement($contactSegmentationAction); $contactSegmentationAction->removeContactSegmentation($this); } return $this; } public function getProducts(): Collection { return $this->products; } public function addProduct(Product $product): self { if (!$this->products->contains($product)) { $this->products[] = $product; $product->addContactSegmentation($this); } return $this; } public function removeProduct(Product $product): self { if ($this->products->contains($product)) { $this->products->removeElement($product); $product->removeContactSegmentation($this); } return $this; } public function getPortalSettings(): Collection { return $this->portalSettings; } public function addPortalSetting(PortalSettings $portalSettings): self { if (!$this->portalSettings->contains($portalSettings)) { $this->portalSettings[] = $portalSettings; $portalSettings->addContactSegmentation($this); } return $this; } public function removePortalSetting(PortalSettings $portalSettings): self { if ($this->portalSettings->contains($portalSettings)) { $this->portalSettings->removeElement($portalSettings); $portalSettings->removeContactSegmentation($this); } return $this; }}