src/Entity/Publications.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PublicationsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PublicationsRepository::class)
  9.  */
  10. class Publications
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $titre;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $link;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $authors;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $venue;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $citations;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $year;
  42.     /**
  43.      * @ORM\ManyToMany(targetEntity=Membre::class, mappedBy="publications" )
  44.      */
  45.     private $membre;
  46.     public function __construct()
  47.     {
  48.         $this->membre = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getTitre(): ?string
  55.     {
  56.         return $this->titre;
  57.     }
  58.     public function setTitre(?string $titre): self
  59.     {
  60.         $this->titre $titre;
  61.         return $this;
  62.     }
  63.     public function getAuthors(): ?string
  64.     {
  65.         return $this->authors;
  66.     }
  67.     public function setAuthors(string $authors): self
  68.     {
  69.         $this->authors $authors;
  70.         return $this;
  71.     }
  72.     public function getVenue(): ?string
  73.     {
  74.         return $this->venue;
  75.     }
  76.     public function setVenue(?string $venue): self
  77.     {
  78.         $this->venue $venue;
  79.         return $this;
  80.     }
  81.     public function getLink(): ?string
  82.     {
  83.         return $this->link;
  84.     }
  85.     public function setLink(?string $link): self
  86.     {
  87.         $this->link $link;
  88.         return $this;
  89.     }
  90.     public function getCitations(): ?string
  91.     {
  92.         return $this->citations;
  93.     }
  94.     public function setCitations(?string $citations): self
  95.     {
  96.         $this->citations $citations;
  97.         return $this;
  98.     }
  99.     public function getYear(): ?string
  100.     {
  101.         return $this->year;
  102.     }
  103.     public function setYear(?string $year): self
  104.     {
  105.         $this->year $year;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return Collection<int, Membre>
  110.      */
  111.     public function getMembre(): Collection
  112.     {
  113.         return $this->Membre;
  114.     }
  115.     public function addMembre(Membre $membre): self
  116.     {
  117.         if (!$this->membre->contains($membre)) {
  118.             $this->membre[] = $membre;
  119.         }
  120.         return $this;
  121.     }
  122.     public function removeMembre(Membre $membre): self
  123.     {
  124.         $this->membre->removeElement($membre);
  125.         return $this;
  126.     }
  127. }