* @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers") */ private Collection $regroupments; /** * Center constructor. */ public function __construct() { $this->groupCenters = new ArrayCollection(); $this->regroupments = new ArrayCollection(); } /** * @return string */ 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; } /** * @return ArrayCollection|Collection */ public function getGroupCenters(): \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\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; } /** * @param $name * * @return $this */ public function setName($name) { $this->name = $name; return $this; } }