src/Entity/EstadoAspecto.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\EstadoAspectoRepository")
  8.  * @ORM\Table(name="estado_aspecto", schema="perseo")
  9.  */
  10. class EstadoAspecto extends EstadoAbstract
  11. {
  12.     /**
  13.      * @ORM\OneToMany(targetEntity="App\Entity\Reloj", mappedBy="aspecto")
  14.      */
  15.     private $relojes;
  16.     /**
  17.      * @ORM\OneToMany(targetEntity="App\Entity\DetalleOperacion", mappedBy="relojAspecto")
  18.      */
  19.     protected $detalleOperaciones;
  20.     /**
  21.      * @ORM\OneToMany(targetEntity=\App\Entity\ActividadAbstract::class, mappedBy="relojAspecto")
  22.      */
  23.     private $actividades;
  24.     /**
  25.      * @ORM\OneToMany(targetEntity="App\Entity\ValoracionesRelojes", mappedBy="relojAspecto")
  26.      */
  27.     protected $valoracionesRelojes;
  28.     public function __construct()
  29.     {
  30.         $this->relojes = new ArrayCollection();
  31.         $this->detalleOperaciones = new ArrayCollection();
  32.         $this->valoracionesRelojes = new ArrayCollection();
  33.         $this->actividades = new ArrayCollection();
  34.     }
  35.     /**
  36.      * @return Collection<int, Reloj>
  37.      */
  38.     public function getRelojes(): Collection
  39.     {
  40.         return $this->relojes;
  41.     }
  42.     public function addReloje(Reloj $reloje): self
  43.     {
  44.         if (!$this->relojes->contains($reloje)) {
  45.             $this->relojes->add($reloje);
  46.             $reloje->setAspecto($this);
  47.         }
  48.         return $this;
  49.     }
  50.     public function removeReloje(Reloj $reloje): self
  51.     {
  52.         if ($this->relojes->removeElement($reloje)) {
  53.             // set the owning side to null (unless already changed)
  54.             if ($reloje->getAspecto() === $this) {
  55.                 $reloje->setAspecto(null);
  56.             }
  57.         }
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Collection<int, DetalleOperacion>
  62.      */
  63.     public function getDetalleOperaciones(): Collection
  64.     {
  65.         return $this->detalleOperaciones;
  66.     }
  67.     public function addDetalleOperacione(DetalleOperacion $detalleOperacione): self
  68.     {
  69.         if (!$this->detalleOperaciones->contains($detalleOperacione)) {
  70.             $this->detalleOperaciones->add($detalleOperacione);
  71.             $detalleOperacione->setRelojAspecto($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeDetalleOperacione(DetalleOperacion $detalleOperacione): self
  76.     {
  77.         if ($this->detalleOperaciones->removeElement($detalleOperacione)) {
  78.             // set the owning side to null (unless already changed)
  79.             if ($detalleOperacione->getRelojAspecto() === $this) {
  80.                 $detalleOperacione->setRelojAspecto(null);
  81.             }
  82.         }
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection|ValoracionesRelojes[]
  87.      */
  88.     public function getValoracionesRelojes(): Collection
  89.     {
  90.         return $this->valoracionesRelojes;
  91.     }
  92.     public function addValoracionesReloje(ValoracionesRelojes $valoracionesReloje): self
  93.     {
  94.         if (!$this->valoracionesRelojes->contains($valoracionesReloje)) {
  95.             $this->valoracionesRelojes[] = $valoracionesReloje;
  96.             $valoracionesReloje->setRelojAspecto($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeValoracionesReloje(ValoracionesRelojes $valoracionesReloje): self
  101.     {
  102.         if ($this->valoracionesRelojes->removeElement($valoracionesReloje)) {
  103.             // set the owning side to null (unless already changed)
  104.             if ($valoracionesReloje->getRelojAspecto() === $this) {
  105.                 $valoracionesReloje->setRelojAspecto(null);
  106.             }
  107.         }
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return Collection<int, ActividadAbstract>
  112.      */
  113.     public function getActividades(): Collection
  114.     {
  115.         return $this->actividades;
  116.     }
  117.     public function addActividade(ActividadAbstract $actividade): static
  118.     {
  119.         if (!$this->actividades->contains($actividade)) {
  120.             $this->actividades->add($actividade);
  121.             $actividade->setRelojAspecto($this);
  122.         }
  123.         return $this;
  124.     }
  125.     public function removeActividade(ActividadAbstract $actividade): static
  126.     {
  127.         if ($this->actividades->removeElement($actividade)) {
  128.             // set the owning side to null (unless already changed)
  129.             if ($actividade->getRelojAspecto() === $this) {
  130.                 $actividade->setRelojAspecto(null);
  131.             }
  132.         }
  133.         return $this;
  134.     }
  135. }