* * @ORM\OneToMany( * targetEntity="Chill\MainBundle\Entity\GroupCenter", * mappedBy="center" * ) */ private Collection $groupCenters; /** * @ORM\Id * * @ORM\Column(name="id", type="integer") * * @ORM\GeneratedValue(strategy="AUTO") * * @Serializer\Groups({"docgen:read"}) */ private ?int $id = null; /** * @ORM\Column(type="string", length=255) * * @Serializer\Groups({"docgen:read"}) */ private string $name = ''; /** * @ORM\Column(type="boolean") */ private bool $isActive = true; /** * @var Collection * * @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers") */ private Collection $regroupments; /** * Center constructor. */ public function __construct() { $this->groupCenters = new ArrayCollection(); $this->regroupments = new ArrayCollection(); } public function __toString(): string { return $this->getName(); } /** * @return $this */ public function addGroupCenter(GroupCenter $groupCenter) { $this->groupCenters->add($groupCenter); return $this; } /** * @return $this|Center */ public function getCenter() { return $this; } public function getGroupCenters(): ArrayCollection|Collection { return $this->groupCenters; } /** * @return int */ public function getId() { return $this->id; } /** * @return string */ public function getName() { return $this->name; } /** * @return Collection */ public function getRegroupments(): Collection { return $this->regroupments; } public function getIsActive(): bool { return $this->isActive; } /** * @return $this */ public function setName($name) { $this->name = $name; return $this; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } }