src/Entity/SecModulo.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SecModuloRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassSecModuloRepository::class)]
  8. class SecModulo
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length100)]
  15.     private ?string $nombre null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $path null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $icono null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $class null;
  22.     #[ORM\Column]
  23.     private ?int $orden null;
  24.     #[ORM\OneToMany(mappedBy'modulo'targetEntitySecFuncion::class)]
  25.     private Collection $secFuncion;
  26.     #[ORM\Column(length255)]
  27.     private ?string $rutaInterna null;
  28.  
  29.     public function __construct()
  30.     {
  31.         $this->secFuncion = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getNombre(): ?string
  38.     {
  39.         return $this->nombre;
  40.     }
  41.     public function setNombre(string $nombre): static
  42.     {
  43.         $this->nombre $nombre;
  44.         return $this;
  45.     }
  46.     public function getPath(): ?string
  47.     {
  48.         return $this->path;
  49.     }
  50.     public function setPath(string $path): static
  51.     {
  52.         $this->path $path;
  53.         return $this;
  54.     }
  55.     public function getIcono(): ?string
  56.     {
  57.         return $this->icono;
  58.     }
  59.     public function setIcono(?string $icono): static
  60.     {
  61.         $this->icono $icono;
  62.         return $this;
  63.     }
  64.     public function getClass(): ?string
  65.     {
  66.         return $this->class;
  67.     }
  68.     public function setClass(?string $class): static
  69.     {
  70.         $this->class $class;
  71.         return $this;
  72.     }
  73.     public function getOrden(): ?int
  74.     {
  75.         return $this->orden;
  76.     }
  77.     public function setOrden(int $orden): static
  78.     {
  79.         $this->orden $orden;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, SecFuncion>
  84.      */
  85.     public function getSecFuncion(): Collection
  86.     {
  87.         return $this->secFuncion;
  88.     }
  89.     public function addSecFuncion(SecFuncion $secFuncion): static
  90.     {
  91.         if (!$this->secFuncion->contains($secFuncion)) {
  92.             $this->secFuncion->add($secFuncion);
  93.             $secFuncion->setModulo($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeSecFuncion(SecFuncion $secFuncion): static
  98.     {
  99.         if ($this->secFuncion->removeElement($secFuncion)) {
  100.             // set the owning side to null (unless already changed)
  101.             if ($secFuncion->getModulo() === $this) {
  102.                 $secFuncion->setModulo(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107.     public function getRutaInterna(): ?string
  108.     {
  109.         return $this->rutaInterna;
  110.     }
  111.     public function setRutaInterna(string $rutaInterna): static
  112.     {
  113.         $this->rutaInterna $rutaInterna;
  114.         return $this;
  115.     }
  116.   
  117. }