<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\TipoCargoMejoraRepository")
* @ORM\Table(name="tipo_cargo_mejora", schema="perseo")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class TipoCargoMejora extends TipoCargoAbstract
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\AccionMejora", mappedBy="tipo")
*/
private $accionesMejora;
public function __construct()
{
parent::__construct();
$this->accionesMejora = new ArrayCollection();
}
/**
* @return Collection<int, AccionMejora>
*/
public function getAccionesMejora(): Collection
{
return $this->accionesMejora;
}
public function addAccionesMejora(AccionMejora $accionesMejora): self
{
if (!$this->accionesMejora->contains($accionesMejora)) {
$this->accionesMejora->add($accionesMejora);
$accionesMejora->setTipo($this);
}
return $this;
}
public function removeAccionesMejora(AccionMejora $accionesMejora): self
{
if ($this->accionesMejora->removeElement($accionesMejora)) {
// set the owning side to null (unless already changed)
if ($accionesMejora->getTipo() === $this) {
$accionesMejora->setTipo(null);
}
}
return $this;
}
}