<?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\EstadoOperacionRepository")
* @ORM\Table(name="estado_operacion", schema="perseo")
*/
class EstadoOperacion extends EstadoAbstract
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\Operacion", mappedBy="estado")
*/
private $operaciones;
public function __construct()
{
$this->operaciones = new ArrayCollection();
}
/**
* @return Collection|Operacion[]
*/
public function getOperaciones(): Collection
{
return $this->operaciones;
}
public function addOperacione(Operacion $operacione): self
{
if (!$this->operaciones->contains($operacione)) {
$this->operaciones[] = $operacione;
$operacione->setEstado($this);
}
return $this;
}
public function removeOperacione(Operacion $operacione): self
{
if ($this->operaciones->removeElement($operacione)) {
// set the owning side to null (unless already changed)
if ($operacione->getEstado() === $this) {
$operacione->setEstado(null);
}
}
return $this;
}
}