src/Domain/Entity/MetadataTramite.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. class MetadataTramite extends Metadata
  6. {
  7.     private Collection $tramites;
  8.     private  $metadataExpediente;
  9.     private Collection $responsables;
  10.     private ?EstadoTramite $estadoInicial null;
  11.     private ?EstadoTramite $estadoFinal null;
  12.     private Collection $estadoDisponibles;
  13.     private Collection $estadoFinales;
  14.     private $incohacion;
  15.     public function __construct()
  16.     {
  17.         parent::__construct();
  18.         $this->tramites = new ArrayCollection();
  19.         $this->responsables = new ArrayCollection();
  20.         $this->estadoDisponibles = new ArrayCollection();
  21.         $this->estadoFinales = new ArrayCollection();
  22.     }
  23.     public function isIncohacion(): ?bool
  24.     {
  25.         return $this->incohacion;
  26.     }
  27.     public function setIncohacion(?bool $incohacion): static
  28.     {
  29.         $this->incohacion $incohacion;
  30.         return $this;
  31.     }
  32.     /**
  33.      * @return Collection<int, Tramite>
  34.      */
  35.     public function getTramites(): Collection
  36.     {
  37.         return $this->tramites;
  38.     }
  39.     public function addTramite(Tramite $tramite): static
  40.     {
  41.         if (!$this->tramites->contains($tramite)) {
  42.             $this->tramites->add($tramite);
  43.             $tramite->setMetadata($this);
  44.         }
  45.         return $this;
  46.     }
  47.     public function removeTramite(Tramite $tramite): static
  48.     {
  49.         if ($this->tramites->removeElement($tramite)) {
  50.             // set the owning side to null (unless already changed)
  51.             if ($tramite->getMetadata() === $this) {
  52.                 $tramite->setMetadata(null);
  53.             }
  54.         }
  55.         return $this;
  56.     }
  57.     public function getMetadataExpediente(): ?MetadataExpediente
  58.     {
  59.         return $this->metadataExpediente;
  60.     }
  61.     public function setMetadataExpediente(?MetadataExpediente $metadataExpediente): static
  62.     {
  63.         $this->metadataExpediente $metadataExpediente;
  64.         return $this;
  65.     }
  66.     public function getEstadoInicial(): ?EstadoTramite
  67.     {
  68.         return $this->estadoInicial;
  69.     }
  70.     public function setEstadoInicial(?EstadoTramite $estadoInicial): static
  71.     {
  72.         $this->estadoInicial $estadoInicial;
  73.         return $this;
  74.     }
  75.     /**
  76.      * @return Collection<int, SonataUserUser>
  77.      */
  78.     public function getResponsables(): Collection
  79.     {
  80.         return $this->responsables;
  81.     }
  82.     public function addResponsable(SonataUserUser $responsable): static
  83.     {
  84.         if (!$this->responsables->contains($responsable)) {
  85.             $this->responsables->add($responsable);
  86.         }
  87.         return $this;
  88.     }
  89.     public function removeResponsable(SonataUserUser $responsable): static
  90.     {
  91.         $this->responsables->removeElement($responsable);
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return Collection<int, EstadoTramite>
  96.      */
  97.     public function getEstadoDisponibles(): Collection
  98.     {
  99.         return $this->estadoDisponibles;
  100.     }
  101.     public function addEstadoDisponible(EstadoTramite $estadoDisponible): static
  102.     {
  103.         if (!$this->estadoDisponibles->contains($estadoDisponible)) {
  104.             $this->estadoDisponibles->add($estadoDisponible);
  105.         }
  106.         return $this;
  107.     }
  108.     public function removeEstadoDisponible(EstadoTramite $estadoDisponible): static
  109.     {
  110.         $this->estadoDisponibles->removeElement($estadoDisponible);
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection<int, EstadoTramite>
  115.      */
  116.     public function getEstadoFinales(): Collection
  117.     {
  118.         return $this->estadoFinales;
  119.     }
  120.     public function addEstadoFinale(EstadoTramite $estadoFinale): static
  121.     {
  122.         if (!$this->estadoFinales->contains($estadoFinale)) {
  123.             $this->estadoFinales->add($estadoFinale);
  124.         }
  125.         return $this;
  126.     }
  127.     public function removeEstadoFinale(EstadoTramite $estadoFinale): static
  128.     {
  129.         $this->estadoFinales->removeElement($estadoFinale);
  130.         return $this;
  131.     }
  132. }