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.     public function __construct()
  30.     {
  31.         $this->contactSegmentationActions = new ArrayCollection();
  32.     }
  33.     public function __toString()
  34.     {
  35.         return $this->name;
  36.     }
  37.     /**
  38.      * @return mixed
  39.      */
  40.     public function getId()
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getName(): ?string
  45.     {
  46.         return $this->name;
  47.     }
  48.     public function setName($name): void
  49.     {
  50.         $this->name $name;
  51.     }
  52.     public function getSalesmanagoTag(): ?string
  53.     {
  54.         return $this->salesmanagoTag;
  55.     }
  56.     public function setSalesmanagoTag($salesmanagoTag): void
  57.     {
  58.         $this->salesmanagoTag $salesmanagoTag;
  59.     }
  60.     /**
  61.      * @return Collection|ContactSegmentationAction[]
  62.      */
  63.     public function getContactSegmentationActions(): Collection
  64.     {
  65.         return $this->contactSegmentationActions;
  66.     }
  67.     public function addContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self
  68.     {
  69.         if (!$this->contactSegmentationActions->contains($contactSegmentationAction)) {
  70.             $this->contactSegmentationActions[] = $contactSegmentationAction;
  71.             $contactSegmentationAction->addContactSegmentation($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeContactSegmentationAction(ContactSegmentationAction $contactSegmentationAction): self
  76.     {
  77.         if ($this->contactSegmentationActions->contains($contactSegmentationAction)) {
  78.             $this->contactSegmentationActions->removeElement($contactSegmentationAction);
  79.             $contactSegmentationAction->removeContactSegmentation($this);
  80.         }
  81.         return $this;
  82.     }
  83. }