*/ #[ORM\OneToMany(mappedBy: 'center', targetEntity: GroupCenter::class)] private Collection $groupCenters; #[Serializer\Groups(['docgen:read'])] #[ORM\Id] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\GeneratedValue(strategy: 'AUTO')] private ?int $id = null; #[Serializer\Groups(['docgen:read'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] private string $name = ''; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::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; } public function getId(): ?int { 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(string $name) { $this->name = $name; return $this; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } }