src/Entity/StatutQualiteAtelier.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StatutQualiteAtelierRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassStatutQualiteAtelierRepository::class)]
  8. class StatutQualiteAtelier 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(targetEntityFicheQualite::class, mappedBy'statut_atelier')]
  19.     private $ficheQualites;
  20.     #[ORM\OneToMany(targetEntityFicheQualiteSynthese::class, mappedBy'statut_atelier')]
  21.     private $ficheQualiteSyntheses;
  22.     public function __construct()
  23.     {
  24.         $this->ficheQualites = new ArrayCollection();
  25.         $this->ficheQualiteSyntheses = new ArrayCollection();
  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|FicheQualite[]
  51.      */
  52.     public function getFicheQualites(): Collection
  53.     {
  54.         return $this->ficheQualites;
  55.     }
  56.     public function addFicheQualite(FicheQualite $ficheQualite): self
  57.     {
  58.         if (!$this->ficheQualites->contains($ficheQualite)) {
  59.             $this->ficheQualites[] = $ficheQualite;
  60.             $ficheQualite->setStatutAtelier($this);
  61.         }
  62.         return $this;
  63.     }
  64.     public function removeFicheQualite(FicheQualite $ficheQualite): self
  65.     {
  66.         if ($this->ficheQualites->removeElement($ficheQualite)) {
  67.             // set the owning side to null (unless already changed)
  68.             if ($ficheQualite->getStatutAtelier() === $this) {
  69.                 $ficheQualite->setStatutAtelier(null);
  70.             }
  71.         }
  72.         return $this;
  73.     }
  74.     public function __toString(): string
  75.     {
  76.         return (string) $this->name;
  77.     }
  78.     /**
  79.      * @return Collection|FicheQualiteSynthese[]
  80.      */
  81.     public function getFicheQualiteSyntheses(): Collection
  82.     {
  83.         return $this->ficheQualiteSyntheses;
  84.     }
  85.     public function addFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
  86.     {
  87.         if (!$this->ficheQualiteSyntheses->contains($ficheQualiteSynthesis)) {
  88.             $this->ficheQualiteSyntheses[] = $ficheQualiteSynthesis;
  89.             $ficheQualiteSynthesis->setStatutAtelier($this);
  90.         }
  91.         return $this;
  92.     }
  93.     public function removeFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
  94.     {
  95.         if ($this->ficheQualiteSyntheses->removeElement($ficheQualiteSynthesis)) {
  96.             // set the owning side to null (unless already changed)
  97.             if ($ficheQualiteSynthesis->getStatutAtelier() === $this) {
  98.                 $ficheQualiteSynthesis->setStatutAtelier(null);
  99.             }
  100.         }
  101.         return $this;
  102.     }
  103. }