src/Entity/DomaineScientifique.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DomaineScientifiqueRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassDomaineScientifiqueRepository::class)]
  8. class DomaineScientifique
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $nomAr null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $nomFr null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $nomAng null;
  20.     #[ORM\OneToMany(mappedBy'domaine'targetEntityStructureRecherche::class)]
  21.     private Collection $structureRecherches;
  22.     public function __construct()
  23.     {
  24.         $this->structureRecherches = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getNomAr(): ?string
  31.     {
  32.         return $this->nomAr;
  33.     }
  34.     public function setNomAr(?string $nomAr): self
  35.     {
  36.         $this->nomAr $nomAr;
  37.         return $this;
  38.     }
  39.     public function getNomFr(): ?string
  40.     {
  41.         return $this->nomFr;
  42.     }
  43.     public function setNomFr(?string $nomFr): self
  44.     {
  45.         $this->nomFr $nomFr;
  46.         return $this;
  47.     }
  48.     public function getNomAng(): ?string
  49.     {
  50.         return $this->nomAng;
  51.     }
  52.     public function setNomAng(?string $nomAng): self
  53.     {
  54.         $this->nomAng $nomAng;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return Collection<int, StructureRecherche>
  59.      */
  60.     public function getStructureRecherches(): Collection
  61.     {
  62.         return $this->structureRecherches;
  63.     }
  64.     public function addStructureRecherch(StructureRecherche $structureRecherch): self
  65.     {
  66.         if (!$this->structureRecherches->contains($structureRecherch)) {
  67.             $this->structureRecherches->add($structureRecherch);
  68.             $structureRecherch->setDomaine($this);
  69.         }
  70.         return $this;
  71.     }
  72.     public function removeStructureRecherch(StructureRecherche $structureRecherch): self
  73.     {
  74.         if ($this->structureRecherches->removeElement($structureRecherch)) {
  75.             // set the owning side to null (unless already changed)
  76.             if ($structureRecherch->getDomaine() === $this) {
  77.                 $structureRecherch->setDomaine(null);
  78.             }
  79.         }
  80.         return $this;
  81.     }
  82. }