<?phpnamespace App\Entity;use App\Repository\ParTipoDisposicionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ParTipoDisposicionRepository::class)]class ParTipoDisposicion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\OneToMany(mappedBy: 'tipoDisposicion', targetEntity: RFDisposicion::class)] private Collection $disposicion; #[ORM\OneToMany(mappedBy: 'tipoDisposicion', targetEntity: RFDisposicionDocumento::class)] private Collection $disposicionDocumentos; public function __construct() { $this->dispocicion = new ArrayCollection(); $this->disposicion = new ArrayCollection(); $this->disposicionDocumentos = new ArrayCollection(); } public function __toString() { return $this->getNombre(); } 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; } /** * @return Collection<int, RFDisposicion> */ public function getDisposicion(): Collection { return $this->disposicion; } public function addDisposicion(RFDisposicion $disposicion): static { if (!$this->disposicion->contains($disposicion)) { $this->disposicion->add($disposicion); $disposicion->setTipoDisposicion($this); } return $this; } public function removeDisposicion(RFDisposicion $disposicion): static { if ($this->disposicion->removeElement($disposicion)) { // set the owning side to null (unless already changed) if ($disposicion->getTipoDisposicion() === $this) { $disposicion->setTipoDisposicion(null); } } return $this; } /** * @return Collection<int, RFDisposicionDocumento> */ public function getDisposicionDocumentos(): Collection { return $this->disposicionDocumentos; } public function addDisposicionDocumento(RFDisposicionDocumento $disposicionDocumento): static { if (!$this->disposicionDocumentos->contains($disposicionDocumento)) { $this->disposicionDocumentos->add($disposicionDocumento); $disposicionDocumento->setTipoDisposicion($this); } return $this; } public function removeDisposicionDocumento(RFDisposicionDocumento $disposicionDocumento): static { if ($this->disposicionDocumentos->removeElement($disposicionDocumento)) { // set the owning side to null (unless already changed) if ($disposicionDocumento->getTipoDisposicion() === $this) { $disposicionDocumento->setTipoDisposicion(null); } } return $this; }}