src/Entity/StatutQualiteSynthese.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StatutQualiteSyntheseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassStatutQualiteSyntheseRepository::class)]
  8. class StatutQualiteSynthese implements \Stringable
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $name;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $name_en;
  18.     #[ORM\OneToMany(targetEntityFicheQualiteSynthese::class, mappedBy'statut')]
  19.     private $ficheQualiteSyntheses;
  20.     public function __construct()
  21.     {
  22.         $this->ficheQualiteSyntheses = new ArrayCollection();
  23.     }
  24.     public function __toString(): string{
  25.         return (string) $this->name;
  26.     }
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getName(): ?string
  32.     {
  33.         return $this->name;
  34.     }
  35.     public function setName(?string $name): self
  36.     {
  37.         $this->name $name;
  38.         return $this;
  39.     }
  40.     public function getNameEn(): ?string
  41.     {
  42.         return $this->name_en;
  43.     }
  44.     public function setNameEn(?string $name_en): self
  45.     {
  46.         $this->name_en $name_en;
  47.         return $this;
  48.     }
  49.     /**
  50.      * @return Collection|FicheQualiteSynthese[]
  51.      */
  52.     public function getFicheQualiteSyntheses(): Collection
  53.     {
  54.         return $this->ficheQualiteSyntheses;
  55.     }
  56.     public function addFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
  57.     {
  58.         if (!$this->ficheQualiteSyntheses->contains($ficheQualiteSynthesis)) {
  59.             $this->ficheQualiteSyntheses[] = $ficheQualiteSynthesis;
  60.             $ficheQualiteSynthesis->setStatut($this);
  61.         }
  62.         return $this;
  63.     }
  64.     public function removeFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
  65.     {
  66.         if ($this->ficheQualiteSyntheses->removeElement($ficheQualiteSynthesis)) {
  67.             // set the owning side to null (unless already changed)
  68.             if ($ficheQualiteSynthesis->getStatut() === $this) {
  69.                 $ficheQualiteSynthesis->setStatut(null);
  70.             }
  71.         }
  72.         return $this;
  73.     }
  74. }