<?phpnamespace App\Entity;use App\Repository\SecFuncionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SecFuncionRepository::class)]class SecFuncion{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 100)] private ?string $nombre = null; #[ORM\Column(length: 100, nullable: true)] private ?string $icono = null; #[ORM\Column(length: 100, nullable: true)] private ?string $class = null; #[ORM\Column] private ?int $orden = null; #[ORM\Column(length: 100)] private ?string $endpoint = null; #[ORM\ManyToOne(inversedBy: 'secFuncion')] private ?SecModulo $modulo = null; #[ORM\OneToMany(mappedBy: 'funcion', targetEntity: SecAccion::class)] private Collection $secAccion; #[ORM\Column] private ?bool $subFuncion = null; #[ORM\Column(nullable: true)] private ?int $funcionPadre = null; #[ORM\Column(length: 300, nullable: true)] private ?string $repository = null; #[ORM\Column(nullable: true)] private ?int $tipo = null; public function __construct() { $this->modulo = new ArrayCollection(); $this->secAccion = 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 getIcono(): ?string { return $this->icono; } public function setIcono(?string $icono): static { $this->icono = $icono; return $this; } public function getClass(): ?string { return $this->class; } public function setClass(?string $class): static { $this->class = $class; return $this; } public function getOrden(): ?int { return $this->orden; } public function setOrden(int $orden): static { $this->orden = $orden; return $this; } public function getEndpoint(): ?string { return $this->endpoint; } public function setEndpoint(string $endpoint): static { $this->endpoint = $endpoint; return $this; } public function getModulo(): ?SecModulo { return $this->modulo; } public function setModulo(?SecModulo $modulo): static { $this->modulo = $modulo; return $this; } /** * @return Collection<int, SecAccion> */ public function getSecAccion(): Collection { return $this->secAccion; } public function addSecAccion(SecAccion $secAccion): static { if (!$this->secAccion->contains($secAccion)) { $this->secAccion->add($secAccion); $secAccion->setFuncion($this); } return $this; } public function removeSecAccion(SecAccion $secAccion): static { if ($this->secAccion->removeElement($secAccion)) { // set the owning side to null (unless already changed) if ($secAccion->getFuncion() === $this) { $secAccion->setFuncion(null); } } return $this; } public function isSubFuncion(): ?bool { return $this->subFuncion; } public function setSubFuncion(bool $subFuncion): static { $this->subFuncion = $subFuncion; return $this; } public function getFuncionPadre(): ?int { return $this->funcionPadre; } public function setFuncionPadre(?int $funcionPadre): static { $this->funcionPadre = $funcionPadre; return $this; } public function getRepository(): ?string { return $this->repository; } public function setRepository(?string $repository): static { $this->repository = $repository; return $this; } public function getTipo(): ?int { return $this->tipo; } public function setTipo(?int $tipo): static { $this->tipo = $tipo; return $this; } }