src/Entity/Bonnet.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BonnetRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassBonnetRepository::class)]
  8. class Bonnet 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\OneToMany(targetEntityTableauMesure::class, mappedBy'bonnet')]
  17.     private $tableauMesures;
  18.     #[ORM\OneToMany(targetEntityFicheControlePreserie::class, mappedBy'bonnet')]
  19.     private $ficheControlePreseries;
  20.     #[ORM\OneToMany(targetEntityDonneeReference::class, mappedBy'bonnet')]
  21.     private $donneeReferences;
  22.     #[ORM\OneToMany(targetEntityFicheQualite::class, mappedBy'bonnet')]
  23.     private $ficheQualites;
  24.     #[ORM\OneToMany(targetEntityFicheQualiteAtelierAuditeur::class, mappedBy'bonnet')]
  25.     private $ficheQualiteAtelierAuditeurs;
  26.     #[ORM\OneToMany(targetEntityFicheQualiteAtelier::class, mappedBy'bonnet')]
  27.     private $ficheQualiteAteliers;
  28.     #[ORM\OneToMany(targetEntityFicheQualiteCent::class, mappedBy'bonnet')]
  29.     private $ficheQualiteCents;
  30.     #[ORM\OneToMany(targetEntityFicheReparation::class, mappedBy'bonnet')]
  31.     private $ficheReparations;
  32.     #[ORM\OneToMany(targetEntityDerogationSynthese::class, mappedBy'bonnet')]
  33.     private $derogationSyntheses;
  34.     #[ORM\OneToMany(targetEntityDerogation::class, mappedBy'bonnet')]
  35.     private $derogations;
  36.     #[ORM\OneToMany(targetEntityLancement::class, mappedBy'bonnet')]
  37.     private $lancements;
  38.     #[ORM\OneToMany(targetEntityJdeCout::class, mappedBy'bonnet')]
  39.     private $jdeCouts;
  40.     public function __construct()
  41.     {
  42.         $this->tableauMesures = new ArrayCollection();
  43.         $this->ficheControlePreseries = new ArrayCollection();
  44.         $this->donneeReferences = new ArrayCollection();
  45.         $this->ficheQualites = new ArrayCollection();
  46.         $this->ficheQualiteAtelierAuditeurs = new ArrayCollection();
  47.         $this->ficheQualiteAteliers = new ArrayCollection();
  48.         $this->ficheQualiteCents = new ArrayCollection();
  49.         $this->ficheReparations = new ArrayCollection();
  50.         $this->derogationSyntheses = new ArrayCollection();
  51.         $this->derogations = new ArrayCollection();
  52.         $this->lancements = new ArrayCollection();
  53.         $this->jdeCouts = new ArrayCollection();
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getName(): ?string
  60.     {
  61.         return $this->name;
  62.     }
  63.     public function setName(?string $name): self
  64.     {
  65.         $this->name $name;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection|TableauMesure[]
  70.      */
  71.     public function getTableauMesures(): Collection
  72.     {
  73.         return $this->tableauMesures;
  74.     }
  75.     public function addTableauMesure(TableauMesure $tableauMesure): self
  76.     {
  77.         if (!$this->tableauMesures->contains($tableauMesure)) {
  78.             $this->tableauMesures[] = $tableauMesure;
  79.             $tableauMesure->setBonnet($this);
  80.         }
  81.         return $this;
  82.     }
  83.     public function removeTableauMesure(TableauMesure $tableauMesure): self
  84.     {
  85.         if ($this->tableauMesures->removeElement($tableauMesure)) {
  86.             // set the owning side to null (unless already changed)
  87.             if ($tableauMesure->getBonnet() === $this) {
  88.                 $tableauMesure->setBonnet(null);
  89.             }
  90.         }
  91.         return $this;
  92.     }
  93.     public function __toString(): string
  94.     {
  95.         return (string) $this->name;
  96.     }
  97.     /**
  98.      * @return Collection|FicheControlePreserie[]
  99.      */
  100.     public function getFicheControlePreseries(): Collection
  101.     {
  102.         return $this->ficheControlePreseries;
  103.     }
  104.     public function addFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
  105.     {
  106.         if (!$this->ficheControlePreseries->contains($ficheControlePreseries)) {
  107.             $this->ficheControlePreseries[] = $ficheControlePreseries;
  108.             $ficheControlePreseries->setBonnet($this);
  109.         }
  110.         return $this;
  111.     }
  112.     public function removeFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
  113.     {
  114.         if ($this->ficheControlePreseries->removeElement($ficheControlePreseries)) {
  115.             // set the owning side to null (unless already changed)
  116.             if ($ficheControlePreseries->getBonnet() === $this) {
  117.                 $ficheControlePreseries->setBonnet(null);
  118.             }
  119.         }
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return Collection|DonneeReference[]
  124.      */
  125.     public function getDonneeReferences(): Collection
  126.     {
  127.         return $this->donneeReferences;
  128.     }
  129.     public function addDonneeReference(DonneeReference $donneeReference): self
  130.     {
  131.         if (!$this->donneeReferences->contains($donneeReference)) {
  132.             $this->donneeReferences[] = $donneeReference;
  133.             $donneeReference->setBonnet($this);
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeDonneeReference(DonneeReference $donneeReference): self
  138.     {
  139.         if ($this->donneeReferences->removeElement($donneeReference)) {
  140.             // set the owning side to null (unless already changed)
  141.             if ($donneeReference->getBonnet() === $this) {
  142.                 $donneeReference->setBonnet(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147.     /**
  148.      * @return Collection|FicheQualite[]
  149.      */
  150.     public function getFicheQualites(): Collection
  151.     {
  152.         return $this->ficheQualites;
  153.     }
  154.     public function addFicheQualite(FicheQualite $ficheQualite): self
  155.     {
  156.         if (!$this->ficheQualites->contains($ficheQualite)) {
  157.             $this->ficheQualites[] = $ficheQualite;
  158.             $ficheQualite->setBonnet($this);
  159.         }
  160.         return $this;
  161.     }
  162.     public function removeFicheQualite(FicheQualite $ficheQualite): self
  163.     {
  164.         if ($this->ficheQualites->removeElement($ficheQualite)) {
  165.             // set the owning side to null (unless already changed)
  166.             if ($ficheQualite->getBonnet() === $this) {
  167.                 $ficheQualite->setBonnet(null);
  168.             }
  169.         }
  170.         return $this;
  171.     }
  172.     /**
  173.      * @return Collection|FicheQualiteAtelierAuditeur[]
  174.      */
  175.     public function getFicheQualiteAtelierAuditeurs(): Collection
  176.     {
  177.         return $this->ficheQualiteAtelierAuditeurs;
  178.     }
  179.     public function addFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  180.     {
  181.         if (!$this->ficheQualiteAtelierAuditeurs->contains($ficheQualiteAtelierAuditeur)) {
  182.             $this->ficheQualiteAtelierAuditeurs[] = $ficheQualiteAtelierAuditeur;
  183.             $ficheQualiteAtelierAuditeur->setBonnet($this);
  184.         }
  185.         return $this;
  186.     }
  187.     public function removeFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  188.     {
  189.         if ($this->ficheQualiteAtelierAuditeurs->removeElement($ficheQualiteAtelierAuditeur)) {
  190.             // set the owning side to null (unless already changed)
  191.             if ($ficheQualiteAtelierAuditeur->getBonnet() === $this) {
  192.                 $ficheQualiteAtelierAuditeur->setBonnet(null);
  193.             }
  194.         }
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return Collection|FicheQualiteAtelier[]
  199.      */
  200.     public function getFicheQualiteAteliers(): Collection
  201.     {
  202.         return $this->ficheQualiteAteliers;
  203.     }
  204.     public function addFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  205.     {
  206.         if (!$this->ficheQualiteAteliers->contains($ficheQualiteAtelier)) {
  207.             $this->ficheQualiteAteliers[] = $ficheQualiteAtelier;
  208.             $ficheQualiteAtelier->setBonnet($this);
  209.         }
  210.         return $this;
  211.     }
  212.     public function removeFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  213.     {
  214.         if ($this->ficheQualiteAteliers->removeElement($ficheQualiteAtelier)) {
  215.             // set the owning side to null (unless already changed)
  216.             if ($ficheQualiteAtelier->getBonnet() === $this) {
  217.                 $ficheQualiteAtelier->setBonnet(null);
  218.             }
  219.         }
  220.         return $this;
  221.     }
  222.     /**
  223.      * @return Collection|FicheQualiteCent[]
  224.      */
  225.     public function getFicheQualiteCents(): Collection
  226.     {
  227.         return $this->ficheQualiteCents;
  228.     }
  229.     public function addFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  230.     {
  231.         if (!$this->ficheQualiteCents->contains($ficheQualiteCent)) {
  232.             $this->ficheQualiteCents[] = $ficheQualiteCent;
  233.             $ficheQualiteCent->setBonnet($this);
  234.         }
  235.         return $this;
  236.     }
  237.     public function removeFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  238.     {
  239.         if ($this->ficheQualiteCents->removeElement($ficheQualiteCent)) {
  240.             // set the owning side to null (unless already changed)
  241.             if ($ficheQualiteCent->getBonnet() === $this) {
  242.                 $ficheQualiteCent->setBonnet(null);
  243.             }
  244.         }
  245.         return $this;
  246.     }
  247.     /**
  248.      * @return Collection<int, FicheReparation>
  249.      */
  250.     public function getFicheReparations(): Collection
  251.     {
  252.         return $this->ficheReparations;
  253.     }
  254.     public function addFicheReparation(FicheReparation $ficheReparation): self
  255.     {
  256.         if (!$this->ficheReparations->contains($ficheReparation)) {
  257.             $this->ficheReparations[] = $ficheReparation;
  258.             $ficheReparation->setBonnet($this);
  259.         }
  260.         return $this;
  261.     }
  262.     public function removeFicheReparation(FicheReparation $ficheReparation): self
  263.     {
  264.         if ($this->ficheReparations->removeElement($ficheReparation)) {
  265.             // set the owning side to null (unless already changed)
  266.             if ($ficheReparation->getBonnet() === $this) {
  267.                 $ficheReparation->setBonnet(null);
  268.             }
  269.         }
  270.         return $this;
  271.     }
  272.     /**
  273.      * @return Collection<int, DerogationSynthese>
  274.      */
  275.     public function getDerogationSyntheses(): Collection
  276.     {
  277.         return $this->derogationSyntheses;
  278.     }
  279.     public function addDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
  280.     {
  281.         if (!$this->derogationSyntheses->contains($derogationSynthesis)) {
  282.             $this->derogationSyntheses[] = $derogationSynthesis;
  283.             $derogationSynthesis->setBonnet($this);
  284.         }
  285.         return $this;
  286.     }
  287.     public function removeDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
  288.     {
  289.         if ($this->derogationSyntheses->removeElement($derogationSynthesis)) {
  290.             // set the owning side to null (unless already changed)
  291.             if ($derogationSynthesis->getBonnet() === $this) {
  292.                 $derogationSynthesis->setBonnet(null);
  293.             }
  294.         }
  295.         return $this;
  296.     }
  297.     /**
  298.      * @return Collection<int, Derogation>
  299.      */
  300.     public function getDerogations(): Collection
  301.     {
  302.         return $this->derogations;
  303.     }
  304.     public function addDerogation(Derogation $derogation): self
  305.     {
  306.         if (!$this->derogations->contains($derogation)) {
  307.             $this->derogations[] = $derogation;
  308.             $derogation->setBonnet($this);
  309.         }
  310.         return $this;
  311.     }
  312.     public function removeDerogation(Derogation $derogation): self
  313.     {
  314.         if ($this->derogations->removeElement($derogation)) {
  315.             // set the owning side to null (unless already changed)
  316.             if ($derogation->getBonnet() === $this) {
  317.                 $derogation->setBonnet(null);
  318.             }
  319.         }
  320.         return $this;
  321.     }
  322.     /**
  323.      * @return Collection<int, Lancement>
  324.      */
  325.     public function getLancements(): Collection
  326.     {
  327.         return $this->lancements;
  328.     }
  329.     public function addLancement(Lancement $lancement): self
  330.     {
  331.         if (!$this->lancements->contains($lancement)) {
  332.             $this->lancements[] = $lancement;
  333.             $lancement->setBonnet($this);
  334.         }
  335.         return $this;
  336.     }
  337.     public function removeLancement(Lancement $lancement): self
  338.     {
  339.         if ($this->lancements->removeElement($lancement)) {
  340.             // set the owning side to null (unless already changed)
  341.             if ($lancement->getBonnet() === $this) {
  342.                 $lancement->setBonnet(null);
  343.             }
  344.         }
  345.         return $this;
  346.     }
  347.     /**
  348.      * @return Collection<int, JdeCout>
  349.      */
  350.     public function getJdeCouts(): Collection
  351.     {
  352.         return $this->jdeCouts;
  353.     }
  354.     public function addJdeCout(JdeCout $jdeCout): self
  355.     {
  356.         if (!$this->jdeCouts->contains($jdeCout)) {
  357.             $this->jdeCouts[] = $jdeCout;
  358.             $jdeCout->setBonnet($this);
  359.         }
  360.         return $this;
  361.     }
  362.     public function removeJdeCout(JdeCout $jdeCout): self
  363.     {
  364.         if ($this->jdeCouts->removeElement($jdeCout)) {
  365.             // set the owning side to null (unless already changed)
  366.             if ($jdeCout->getBonnet() === $this) {
  367.                 $jdeCout->setBonnet(null);
  368.             }
  369.         }
  370.         return $this;
  371.     }
  372. }