<?php
namespace App\Entity\Gos;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ContactSegmentationActionRepository")
*/
class ContactSegmentationAction
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $action;
/**
* @ORM\ManyToMany(targetEntity=ContactSegmentation::class, inversedBy="contactSegmentationActions")
*/
private $contactSegmentations;
public function __construct()
{
$this->contactSegmentations = new ArrayCollection();
}
public function __toString()
{
return $this->action;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
public function getAction(): ?string
{
return $this->action;
}
public function setAction($action): void
{
$this->action = $action;
}
/**
* @return Collection|ContactSegmentation[]
*/
public function getContactSegmentations(): Collection
{
return $this->contactSegmentations;
}
public function addContactSegmentation(ContactSegmentation $contactSegmentation): self
{
if (!$this->contactSegmentations->contains($contactSegmentation)) {
$this->contactSegmentations[] = $contactSegmentation;
}
return $this;
}
public function removeContactSegmentation(ContactSegmentation $contactSegmentation): self
{
if ($this->contactSegmentations->contains($contactSegmentation)) {
$this->contactSegmentations->removeElement($contactSegmentation);
}
return $this;
}
}