<?php
namespace App\Entity;
use App\Repository\StatutQualiteSyntheseRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: StatutQualiteSyntheseRepository::class)]
class StatutQualiteSynthese implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name_en;
#[ORM\OneToMany(targetEntity: FicheQualiteSynthese::class, mappedBy: 'statut')]
private $ficheQualiteSyntheses;
public function __construct()
{
$this->ficheQualiteSyntheses = new ArrayCollection();
}
public function __toString(): string{
return (string) $this->name;
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getNameEn(): ?string
{
return $this->name_en;
}
public function setNameEn(?string $name_en): self
{
$this->name_en = $name_en;
return $this;
}
/**
* @return Collection|FicheQualiteSynthese[]
*/
public function getFicheQualiteSyntheses(): Collection
{
return $this->ficheQualiteSyntheses;
}
public function addFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
{
if (!$this->ficheQualiteSyntheses->contains($ficheQualiteSynthesis)) {
$this->ficheQualiteSyntheses[] = $ficheQualiteSynthesis;
$ficheQualiteSynthesis->setStatut($this);
}
return $this;
}
public function removeFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
{
if ($this->ficheQualiteSyntheses->removeElement($ficheQualiteSynthesis)) {
// set the owning side to null (unless already changed)
if ($ficheQualiteSynthesis->getStatut() === $this) {
$ficheQualiteSynthesis->setStatut(null);
}
}
return $this;
}
}