src/Entity/Gestiform/Formations/Catalogue/Editeur.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Catalogue;
  3. use App\Entity\AbstractEntity;
  4. use App\Entity\Common\Upload;
  5. use App\Repository\Gestiform\Formations\Catalogue\EditeurRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\DBAL\Types\Types;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Entity(repositoryClass=EditeurRepository::class)
  12.  */
  13. class Editeur extends AbstractEntity
  14. {
  15.     /**
  16.      * @ORM\Column(type="string", length=255, nullable=false)
  17.      */
  18.     private string $intitule;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private ?string $alt;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private ?string $commentaire;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private ?string $detail;
  31.     /**
  32.      * @ORM\Column(type="text", nullable=true)
  33.      */
  34.     private ?string $lien;
  35.     /**
  36.      * @ORM\Column(type="datetime", nullable=true)
  37.      */
  38.     private ?\DateTime $dateinscription;
  39.     /**
  40.      * @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
  41.      * @ORM\JoinColumn(nullable=true)
  42.      */
  43.     private ?Upload $photo null;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private ?string $altphoto;
  48.     /**
  49.      * @ORM\OneToMany(targetEntity=Certification::class, mappedBy="editeur")
  50.      */
  51.     private Collection $certifications;
  52.     public function __construct()
  53.     {
  54.         $this->certifications = new ArrayCollection();
  55.     }
  56.     public function getIntitule(): ?string
  57.     {
  58.         return $this->intitule;
  59.     }
  60.     public function setIntitule(string $intitule): self
  61.     {
  62.         $this->intitule $intitule;
  63.         return $this;
  64.     }
  65.     public function getAlt(): ?string
  66.     {
  67.         return $this->alt;
  68.     }
  69.     public function setAlt(?string $alt): self
  70.     {
  71.         $this->alt $alt;
  72.         return $this;
  73.     }
  74.     public function getCommentaire(): ?string
  75.     {
  76.         return $this->commentaire;
  77.     }
  78.     public function setCommentaire(?string $commentaire): self
  79.     {
  80.         $this->commentaire $commentaire;
  81.         return $this;
  82.     }
  83.     public function getDetail(): ?string
  84.     {
  85.         return $this->detail;
  86.     }
  87.     public function setDetail(?string $detail): self
  88.     {
  89.         $this->detail $detail;
  90.         return $this;
  91.     }
  92.     public function getLien(): ?string
  93.     {
  94.         return $this->lien;
  95.     }
  96.     public function setLien(?string $lien): self
  97.     {
  98.         $this->lien $lien;
  99.         return $this;
  100.     }
  101.     public function getDateinscription(): ?\DateTime
  102.     {
  103.         return $this->dateinscription;
  104.     }
  105.     public function setDateinscription(?\DateTime $dateinscription): self
  106.     {
  107.         $this->dateinscription $dateinscription;
  108.         return $this;
  109.     }
  110.     public function getPhoto(): ?Upload
  111.     {
  112.         return $this->photo;
  113.     }
  114.     public function setPhoto(?Upload $photo): self
  115.     {
  116.         $this->photo $photo;
  117.         return $this;
  118.     }
  119.     public function getAltphoto(): ?string
  120.     {
  121.         return $this->altphoto;
  122.     }
  123.     public function setAltphoto(?string $altphoto): self
  124.     {
  125.         $this->altphoto $altphoto;
  126.         return $this;
  127.     }
  128.     /**
  129.      * @return Collection<int, Certification>
  130.      */
  131.     public function getCertifications(): Collection
  132.     {
  133.         return $this->certifications;
  134.     }
  135.     public function addCertification(Certification $certification): self
  136.     {
  137.         if (!$this->certifications->contains($certification)) {
  138.             $this->certifications->add($certification);
  139.             $certification->setEditeur($this);
  140.         }
  141.         return $this;
  142.     }
  143.     public function removeCertification(Certification $certification): self
  144.     {
  145.         if ($this->certifications->removeElement($certification)) {
  146.             // set the owning side to null (unless already changed)
  147.             if ($certification->getEditeur() === $this) {
  148.                 $certification->setEditeur(null);
  149.             }
  150.         }
  151.         return $this;
  152.     }
  153.  
  154. }