src/Entity/CategorieFamille.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CategorieFamilleRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCategorieFamilleRepository::class)]
  8. class CategorieFamille 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\ManyToOne(targetEntitySouscategorieMetier::class, inversedBy'categorieFamilles'cascade: ['persist'])]
  19.     private $souscategorie;
  20.     #[ORM\ManyToMany(targetEntityCategorieArticle::class, mappedBy'categoriefamilles')]
  21.     private $categorieArticles;
  22.     #[ORM\ManyToOne(targetEntityCategorieMetier::class, inversedBy'categorieFamilles'cascade: ['persist'])]
  23.     private $categorie;
  24.     #[ORM\ManyToMany(targetEntityDefautCategorie::class, inversedBy'categorieFamilles')]
  25.     private $categoriesdefaut;
  26.     #[ORM\OneToMany(targetEntityDefautParFamille::class, mappedBy'categoriefamille'cascade: ['persist''remove'])]
  27.     private $defautParFamilles;
  28.     #[ORM\OneToMany(targetEntityFicheQualite::class, mappedBy'famille'cascade: ['persist''remove'])]
  29.     private $ficheQualites;
  30.     #[ORM\OneToMany(targetEntityFicheQualiteAtelierAuditeur::class, mappedBy'famille'cascade: ['persist''remove'])]
  31.     private $ficheQualiteAtelierAuditeurs;
  32.     #[ORM\OneToMany(targetEntityFicheQualiteAtelier::class, mappedBy'famille'cascade: ['persist''remove'])]
  33.     private $ficheQualiteAteliers;
  34.     #[ORM\OneToMany(targetEntityFicheQualiteCent::class, mappedBy'famille'cascade: ['persist''remove'])]
  35.     private $ficheQualiteCents;
  36.     public function __construct()
  37.     {
  38.         $this->categorieArticles = new ArrayCollection();
  39.         $this->categoriesdefaut = new ArrayCollection();
  40.         $this->defautParFamilles = new ArrayCollection();
  41.         $this->ficheQualites = new ArrayCollection();
  42.         $this->ficheQualiteAtelierAuditeurs = new ArrayCollection();
  43.         $this->ficheQualiteAteliers = new ArrayCollection();
  44.         $this->ficheQualiteCents = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(?string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getNameEn(): ?string
  60.     {
  61.         return $this->name_en;
  62.     }
  63.     public function setNameEn(?string $name_en): self
  64.     {
  65.         $this->name_en $name_en;
  66.         return $this;
  67.     }
  68.     public function getSouscategorie(): ?SouscategorieMetier
  69.     {
  70.         return $this->souscategorie;
  71.     }
  72.     public function setSouscategorie(?SouscategorieMetier $souscategorie): self
  73.     {
  74.         $this->souscategorie $souscategorie;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Collection|CategorieArticle[]
  79.      */
  80.     public function getCategorieArticles(): Collection
  81.     {
  82.         return $this->categorieArticles;
  83.     }
  84.     public function addCategorieArticle(CategorieArticle $categorieArticle): self
  85.     {
  86.         if (!$this->categorieArticles->contains($categorieArticle)) {
  87.             $this->categorieArticles[] = $categorieArticle;
  88.             $categorieArticle->addCategoriefamille($this);
  89.         }
  90.         return $this;
  91.     }
  92.     public function removeCategorieArticle(CategorieArticle $categorieArticle): self
  93.     {
  94.         if ($this->categorieArticles->removeElement($categorieArticle)) {
  95.             $categorieArticle->removeCategoriefamille($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function getCategorie(): ?CategorieMetier
  100.     {
  101.         return $this->categorie;
  102.     }
  103.     public function setCategorie(?CategorieMetier $categorie): self
  104.     {
  105.         $this->categorie $categorie;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return Collection|DefautCategorie[]
  110.      */
  111.     public function getCategoriesdefaut(): Collection
  112.     {
  113.         return $this->categoriesdefaut;
  114.     }
  115.     public function addCategoriesdefaut(DefautCategorie $categoriesdefaut): self
  116.     {
  117.         if (!$this->categoriesdefaut->contains($categoriesdefaut)) {
  118.             $this->categoriesdefaut[] = $categoriesdefaut;
  119.         }
  120.         return $this;
  121.     }
  122.     public function removeCategoriesdefaut(DefautCategorie $categoriesdefaut): self
  123.     {
  124.         $this->categoriesdefaut->removeElement($categoriesdefaut);
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return Collection|DefautParFamille[]
  129.      */
  130.     public function getDefautParFamilles(): Collection
  131.     {
  132.         return $this->defautParFamilles;
  133.     }
  134.     public function addDefautParFamille(DefautParFamille $defautParFamille): self
  135.     {
  136.         if (!$this->defautParFamilles->contains($defautParFamille)) {
  137.             $this->defautParFamilles[] = $defautParFamille;
  138.             $defautParFamille->setCategoriefamille($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeDefautParFamille(DefautParFamille $defautParFamille): self
  143.     {
  144.         if ($this->defautParFamilles->removeElement($defautParFamille)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($defautParFamille->getCategoriefamille() === $this) {
  147.                 $defautParFamille->setCategoriefamille(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection|FicheQualite[]
  154.      */
  155.     public function getFicheQualites(): Collection
  156.     {
  157.         return $this->ficheQualites;
  158.     }
  159.     public function addFicheQualite(FicheQualite $ficheQualite): self
  160.     {
  161.         if (!$this->ficheQualites->contains($ficheQualite)) {
  162.             $this->ficheQualites[] = $ficheQualite;
  163.             $ficheQualite->setFamille($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeFicheQualite(FicheQualite $ficheQualite): self
  168.     {
  169.         if ($this->ficheQualites->removeElement($ficheQualite)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($ficheQualite->getFamille() === $this) {
  172.                 $ficheQualite->setFamille(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     public function __toString(): string
  178.     {
  179.         return (string) $this->name;
  180.     }
  181.     /**
  182.      * @return Collection|FicheQualiteAtelierAuditeur[]
  183.      */
  184.     public function getFicheQualiteAtelierAuditeurs(): Collection
  185.     {
  186.         return $this->ficheQualiteAtelierAuditeurs;
  187.     }
  188.     public function addFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  189.     {
  190.         if (!$this->ficheQualiteAtelierAuditeurs->contains($ficheQualiteAtelierAuditeur)) {
  191.             $this->ficheQualiteAtelierAuditeurs[] = $ficheQualiteAtelierAuditeur;
  192.             $ficheQualiteAtelierAuditeur->setFamille($this);
  193.         }
  194.         return $this;
  195.     }
  196.     public function removeFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  197.     {
  198.         if ($this->ficheQualiteAtelierAuditeurs->removeElement($ficheQualiteAtelierAuditeur)) {
  199.             // set the owning side to null (unless already changed)
  200.             if ($ficheQualiteAtelierAuditeur->getFamille() === $this) {
  201.                 $ficheQualiteAtelierAuditeur->setFamille(null);
  202.             }
  203.         }
  204.         return $this;
  205.     }
  206.     /**
  207.      * @return Collection|FicheQualiteAtelier[]
  208.      */
  209.     public function getFicheQualiteAteliers(): Collection
  210.     {
  211.         return $this->ficheQualiteAteliers;
  212.     }
  213.     public function addFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  214.     {
  215.         if (!$this->ficheQualiteAteliers->contains($ficheQualiteAtelier)) {
  216.             $this->ficheQualiteAteliers[] = $ficheQualiteAtelier;
  217.             $ficheQualiteAtelier->setFamille($this);
  218.         }
  219.         return $this;
  220.     }
  221.     public function removeFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  222.     {
  223.         if ($this->ficheQualiteAteliers->removeElement($ficheQualiteAtelier)) {
  224.             // set the owning side to null (unless already changed)
  225.             if ($ficheQualiteAtelier->getFamille() === $this) {
  226.                 $ficheQualiteAtelier->setFamille(null);
  227.             }
  228.         }
  229.         return $this;
  230.     }
  231.     /**
  232.      * @return Collection|FicheQualiteCent[]
  233.      */
  234.     public function getFicheQualiteCents(): Collection
  235.     {
  236.         return $this->ficheQualiteCents;
  237.     }
  238.     public function addFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  239.     {
  240.         if (!$this->ficheQualiteCents->contains($ficheQualiteCent)) {
  241.             $this->ficheQualiteCents[] = $ficheQualiteCent;
  242.             $ficheQualiteCent->setFamille($this);
  243.         }
  244.         return $this;
  245.     }
  246.     public function removeFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  247.     {
  248.         if ($this->ficheQualiteCents->removeElement($ficheQualiteCent)) {
  249.             // set the owning side to null (unless already changed)
  250.             if ($ficheQualiteCent->getFamille() === $this) {
  251.                 $ficheQualiteCent->setFamille(null);
  252.             }
  253.         }
  254.         return $this;
  255.     }
  256. }