src/Entity/Committee.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommitteeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCommitteeRepository::class)]
  8. class Committee
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $libelle null;
  16.     #[ORM\ManyToMany(targetEntityCommitteemember::class, inversedBy'committees')]
  17.     private Collection $Committeembr;
  18.     public function __construct()
  19.     {
  20.         $this->Committeembr = new ArrayCollection();
  21.     }
  22.     
  23.     
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getLibelle(): ?string
  29.     {
  30.         return $this->libelle;
  31.     }
  32.     public function setLibelle(?string $libelle): static
  33.     {
  34.         $this->libelle $libelle;
  35.         return $this;
  36.     }
  37.     /**
  38.      * @return Collection<int, Committeemember>
  39.      */
  40.     public function getCommitteembr(): Collection
  41.     {
  42.         return $this->Committeembr;
  43.     }
  44.     public function addCommitteembr(Committeemember $committeembr): static
  45.     {
  46.         if (!$this->Committeembr->contains($committeembr)) {
  47.             $this->Committeembr->add($committeembr);
  48.         }
  49.         return $this;
  50.     }
  51.     public function removeCommitteembr(Committeemember $committeembr): static
  52.     {
  53.         $this->Committeembr->removeElement($committeembr);
  54.         return $this;
  55.     }
  56.     
  57. }