*/ #[ORM\ManyToMany(targetEntity: Center::class, inversedBy: 'regroupments')] #[ORM\Id] private Collection $centers; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] private ?int $id = null; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] private bool $isActive = true; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => ''], nullable: false)] private string $name = ''; public function __construct() { $this->centers = new ArrayCollection(); } public function addCenter(Center $center): self { if (!$this->centers->contains($center)) { $this->centers->add($center); $center->getRegroupments()->add($this); } return $this; } public function removeCenter(Center $center): self { if ($this->centers->contains($center)) { $this->centers->removeElement($center); $center->getRegroupments()->removeElement($this); } return $this; } public function getCenters(): Collection { return $this->centers; } public function getId(): ?int { return $this->id; } public function getIsActive(): bool { return $this->isActive; } public function getName(): string { return $this->name; } public function setCenters(?Collection $centers): self { $this->centers = $centers; return $this; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } public function setName(string $name): self { $this->name = $name; return $this; } /** * Return true if the given center is contained into this regroupment. */ public function containsCenter(Center $center): bool { return $this->centers->contains($center); } /** * Return true if at least one of the given centers is contained into this regroupment. * * @param list