<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EstadoValoracionRepository")
* @ORM\Table(name="estado_valoracion", schema="perseo")
*/
class EstadoValoracion extends EstadoAbstract
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\Valoracion", mappedBy="estado")
*/
protected $valoraciones;
public function __construct()
{
$this->valoraciones = new ArrayCollection();
}
/**
* @return Collection|Valoracion[]
*/
public function getValoraciones(): Collection
{
return $this->valoraciones;
}
public function addValoracione(Valoracion $valoracione): self
{
if (!$this->valoraciones->contains($valoracione)) {
$this->valoraciones[] = $valoracione;
$valoracione->setEstado($this);
}
return $this;
}
public function removeValoracione(Valoracion $valoracione): self
{
if ($this->valoraciones->removeElement($valoracione)) {
// set the owning side to null (unless already changed)
if ($valoracione->getEstado() === $this) {
$valoracione->setEstado(null);
}
}
return $this;
}
}