src/Entity/Gestiform/Formations/Catalogue/Editeur.php line 16
<?php
namespace App\Entity\Gestiform\Formations\Catalogue;
use DateTime;
use App\Entity\AbstractEntity;
use App\Entity\Common\Upload;
use App\Repository\Gestiform\Formations\Catalogue\EditeurRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EditeurRepository::class)]
class Editeur extends AbstractEntity
{
#[ORM\Column(type: 'string', length: 255, nullable: false)]
private string $intitule;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $alt;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $commentaire;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $detail;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $lien;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?DateTime $dateinscription;
#[ORM\JoinColumn(nullable: true)]
#[ORM\OneToOne(targetEntity: Upload::class, cascade: ['persist', 'remove'])]
private ?Upload $photo = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $altphoto;
#[ORM\OneToMany(mappedBy: 'editeur', targetEntity: Certification::class)]
private Collection $certifications;
public function __construct()
{
$this->certifications = new ArrayCollection();
}
public function getIntitule(): ?string
{
return $this->intitule;
}
public function setIntitule(string $intitule): self
{
$this->intitule = $intitule;
return $this;
}
public function getAlt(): ?string
{
return $this->alt;
}
public function setAlt(?string $alt): self
{
$this->alt = $alt;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getDetail(): ?string
{
return $this->detail;
}
public function setDetail(?string $detail): self
{
$this->detail = $detail;
return $this;
}
public function getLien(): ?string
{
return $this->lien;
}
public function setLien(?string $lien): self
{
$this->lien = $lien;
return $this;
}
public function getDateinscription(): ?DateTime
{
return $this->dateinscription;
}
public function setDateinscription(?DateTime $dateinscription): self
{
$this->dateinscription = $dateinscription;
return $this;
}
public function getPhoto(): ?Upload
{
return $this->photo;
}
public function setPhoto(?Upload $photo): self
{
$this->photo = $photo;
return $this;
}
public function getAltphoto(): ?string
{
return $this->altphoto;
}
public function setAltphoto(?string $altphoto): self
{
$this->altphoto = $altphoto;
return $this;
}
/**
* @return Collection<int, Certification>
*/
public function getCertifications(): Collection
{
return $this->certifications;
}
public function addCertification(Certification $certification): self
{
if (!$this->certifications->contains($certification)) {
$this->certifications->add($certification);
$certification->setEditeur($this);
}
return $this;
}
public function removeCertification(Certification $certification): self
{
// set the owning side to null (unless already changed)
if ($this->certifications->removeElement($certification) && $certification->getEditeur() === $this) {
$certification->setEditeur(null);
}
return $this;
}
}