<?phpnamespace App\Entity;use App\Repository\TipoFormacionCursoRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TipoFormacionCursoRepository::class)]class TipoFormacionCurso{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre; #[ORM\Column(length: 7)] private ?string $colorHexFondo; #[ORM\Column(length: 7)] private ?string $colorHexTexto; #[ORM\Column] private ?bool $visible = true; #[ORM\Column] private ?bool $borrado = false; #[ORM\OneToMany(mappedBy: 'tipoFormacion', targetEntity: CalendarioCurso::class)] private Collection $calendario; public function __construct() { $this->calendario = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): static { $this->nombre = $nombre; return $this; } public function getColorHexFondo(): ?string { return $this->colorHexFondo; } public function setColorHexFondo(string $colorHexFondo): static { $this->colorHexFondo = $colorHexFondo; return $this; } public function getColorHexTexto(): ?string { return $this->colorHexTexto; } public function setColorHexTexto(string $colorHexTexto): static { $this->colorHexTexto = $colorHexTexto; return $this; } public function isVisible(): ?bool { return $this->visible; } public function setVisible(bool $visible): static { $this->visible = $visible; return $this; } public function isBorrado(): ?bool { return $this->borrado; } public function setBorrado(bool $borrado): static { $this->borrado = $borrado; return $this; } /** * @return Collection<int, CalendarioCurso> */ public function getCalendario(): Collection { return $this->calendario; } public function addCalendario(CalendarioCurso $calendario): static { if (!$this->calendario->contains($calendario)) { $this->calendario->add($calendario); $calendario->setTipoFormacion($this); } return $this; } public function removeCalendario(CalendarioCurso $calendario): static { if ($this->calendario->removeElement($calendario)) { // set the owning side to null (unless already changed) if ($calendario->getTipoFormacion() === $this) { $calendario->setTipoFormacion(null); } } return $this; }}