<?php
namespace App\Entity;
use App\Repository\NivelFormativoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NivelFormativoRepository::class)]
class NivelFormativo
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private ?string $nombre = null;
#[ORM\Column(type: 'boolean')]
private bool $visible = true;
#[ORM\Column(type: 'boolean')]
private bool $borrado = false;
#[ORM\OneToMany(targetEntity: AccionFormativa::class, mappedBy: 'nivelFormativo')]
private Collection $accionesFormativas;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $descripcionNivelPlantilla = null;
public function __construct()
{
$this->accionesFormativas = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(?string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
public function isVisible(): ?bool
{
return $this->visible;
}
public function setVisible(bool $visible): self
{
$this->visible = $visible;
return $this;
}
public function isBorrado(): ?bool
{
return $this->borrado;
}
public function setBorrado(bool $borrado): self
{
$this->borrado = $borrado;
return $this;
}
/**
* @return Collection<int, AccionFormativa>
*/
public function getAccionesFormativas(): Collection
{
return $this->accionesFormativas;
}
public function addAccionesFormativa(AccionFormativa $accionesFormativa): self
{
if (!$this->accionesFormativas->contains($accionesFormativa)) {
$this->accionesFormativas[] = $accionesFormativa;
$accionesFormativa->setNivelFormativo($this);
}
return $this;
}
public function removeAccionesFormativa(AccionFormativa $accionesFormativa): self
{
// set the owning side to null (unless already changed)
if ($this->accionesFormativas->removeElement($accionesFormativa) && $accionesFormativa->getNivelFormativo() === $this) {
$accionesFormativa->setNivelFormativo(null);
}
return $this;
}
public function getDescripcionNivelPlantilla(): ?string
{
return $this->descripcionNivelPlantilla;
}
public function setDescripcionNivelPlantilla(?string $descripcionNivelPlantilla): self
{
$this->descripcionNivelPlantilla = $descripcionNivelPlantilla;
return $this;
}
}