src/Entity/Encadrement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EncadrementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use App\Enum\TypeEncadrement;
  9. #[ORM\Entity(repositoryClassEncadrementRepository::class)]
  10. class Encadrement
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $fullname null;
  19.     #[ORM\Column(length50enumTypeTypeEncadrement::class, nullabletrue)]
  20.     private ?TypeEncadrement $type null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $titleofsubject null;
  23.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  24.     private ?\DateTimeImmutable $Datedebut null;
  25.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  26.     private ?\DateTimeImmutable $Datefin null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $email null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $telephone null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $lien null;
  33.     #[ORM\ManyToMany(targetEntityPublication::class, mappedBy'authors')]
  34.     private Collection $publications;
  35.     public function __construct()
  36.     {
  37.         $this->publications = new ArrayCollection();
  38.     }
  39.     
  40.     public function getType(): ?TypeEncadrement
  41.     {
  42.         return $this->type;
  43.     }
  44.     
  45.     public function setType(?TypeEncadrement $type): static
  46.     {
  47.         $this->type $type;
  48.         return $this;
  49.     }
  50.     
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.    
  56.     public function getFullname(): ?string
  57.     {
  58.         return $this->fullname;
  59.     }
  60.     public function setFullname(?string $fullname): self
  61.     {
  62.         $this->fullname $fullname;
  63.         return $this;
  64.     }
  65.     public function getTitleofsubject(): ?string
  66.     {
  67.         return $this->titleofsubject;
  68.     }
  69.     public function setTitleofsubject(?string $titleofsubject): self
  70.     {
  71.         $this->titleofsubject $titleofsubject;
  72.         return $this;
  73.     }
  74.     public function getDatedebut(): ?\DateTimeImmutable
  75.     {
  76.         return $this->Datedebut;
  77.     }
  78.     public function setDatedebut(?\DateTimeImmutable $Datedebut): self
  79.     {
  80.         $this->Datedebut $Datedebut;
  81.         return $this;
  82.     }
  83.     public function getDatefin(): ?\DateTimeImmutable
  84.     {
  85.         return $this->Datefin;
  86.     }
  87.     public function setDatefin(?\DateTimeImmutable $Datefin): self
  88.     {
  89.         $this->Datefin $Datefin;
  90.         return $this;
  91.     }
  92.     public function getEmail(): ?string
  93.     {
  94.         return $this->email;
  95.     }
  96.     public function setEmail(?string $email): self
  97.     {
  98.         $this->email $email;
  99.         return $this;
  100.     }
  101.     public function getTelephone(): ?string
  102.     {
  103.         return $this->telephone;
  104.     }
  105.     public function setTelephone(?string $telephone): self
  106.     {
  107.         $this->telephone $telephone;
  108.         return $this;
  109.     }
  110.     public function getLien(): ?string
  111.     {
  112.         return $this->lien;
  113.     }
  114.     public function setLien(?string $lien): self
  115.     {
  116.         $this->lien $lien;
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return Collection<int, Publication>
  121.      */
  122.     public function getPublications(): Collection
  123.     {
  124.         return $this->publications;
  125.     }
  126.     public function addPublication(Publication $publication): self
  127.     {
  128.         if (!$this->publications->contains($publication)) {
  129.             $this->publications->add($publication);
  130.             $publication->addAuthor($this);
  131.         }
  132.         return $this;
  133.     }
  134.     public function removePublication(Publication $publication): self
  135.     {
  136.         if ($this->publications->removeElement($publication)) {
  137.             $publication->removeAuthor($this);
  138.         }
  139.         return $this;
  140.     }
  141. }