true])] #[Assert\NotNull] #[Serializer\Expose] #[Serializer\Groups(['Default'])] private bool $visible = true; use ColorTrait; /** * This is ONLY here, so we can count the amount of timesheets. * * @var Collection */ #[ORM\ManyToMany(targetEntity: Timesheet::class, mappedBy: 'tags', fetch: 'EXTRA_LAZY')] private Collection $timesheets; public function __construct() { $this->timesheets = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function setName(?string $tagName): Tag { $this->name = $tagName !== null ? trim($tagName) : $tagName; return $this; } public function getName(): ?string { return $this->name; } public function isVisible(): bool { return $this->visible; } public function setVisible(bool $visible): void { $this->visible = $visible; } public function __toString(): string { return $this->getName(); } }