<?phpnamespace App\Entity;use App\Repository\Criteria5Repository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=Criteria5Repository::class) */class Criteria5{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="boolean") */ private $isActive = true; /** * @ORM\OneToMany(targetEntity=Criteria5Item::class, mappedBy="criteria5", orphanRemoval=true, cascade={"persist"}) */ private $criteria5Items; #[ORM\ManyToMany(targetEntity: Instance::class, mappedBy: 'criteria5')] private Collection $instances; public function __construct() { $this->criteria5Items = new ArrayCollection(); $this->instances = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection<int, Criteria5Item> */ public function getCriteria5Items(): Collection { return $this->criteria5Items; } public function addCriteria5Item(Criteria5Item $criteria5Item): self { if (!$this->criteria5Items->contains($criteria5Item)) { $this->criteria5Items[] = $criteria5Item; $criteria5Item->setCriteria5($this); } return $this; } public function removeCriteria5Item(Criteria5Item $criteria5Item): self { if ($this->criteria5Items->removeElement($criteria5Item)) { // set the owning side to null (unless already changed) if ($criteria5Item->getCriteria5() === $this) { $criteria5Item->setCriteria5(null); } } return $this; } public function isActive(): bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } public function __toString(): string { return $this->getName(); }}