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

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