<?php
namespace App\Entity;
use App\Repository\Actuv2InfographieRseRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: Actuv2InfographieRseRepository::class)]
class Actuv2InfographieRse
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(name: 'date', type: 'date', nullable: true, options: ['comment' => 'période'])]
private $date;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $imageDesktop = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageDesktop")
* @var File
*/
private $fileImageDesktop;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $imageThumbnail = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageThumbnail")
* @var File
*/
private $fileImageThumbnail;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $imageThumbnailWebp = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageThumbnailWebp")
* @var File
*/
private $fileImageThumbnailWebp;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteFooter = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteFooter")
* @var File
*/
private $fileVignetteFooter;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteLandingPage = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteLandingPage")
* @var File
*/
private $fileVignetteLandingPage;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteNewsletter = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteNewsletter")
* @var File
*/
private $fileVignetteNewsletter;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $imageDesktopWebp = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageDesktopWebp")
* @var File
*/
private $fileImageDesktopWebp;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteFooterWebp = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteFooterWebp")
* @var File
*/
private $fileVignetteFooterWebp;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteLandingPageWebp = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteLandingPageWebp")
* @var File
*/
private $fileVignetteLandingPageWebp;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $vignetteNewsletterWebp = null;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteNewsletterWebp")
* @var File
*/
private $fileVignetteNewsletterWebp;
#[ORM\OneToMany(mappedBy: 'actuv2InfographieRse', targetEntity: Actuv2InfographieRseCarouselMobileFile::class, orphanRemoval: true, cascade: ['persist', 'remove'])]
private $actuv2InfographieRseCarouselMobileFiles;
#[ORM\Column(type: 'datetime')]
private $updatedAt;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $vignetteArchivage;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteArchivage")
* @var File
*/
private $fileVignetteArchivage;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $vignetteArchivageWebp;
/**
* @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteArchivageWebp")
* @var File
*/
private $fileVignetteArchivageWebp;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $title;
/**
* @var string
*
*/
#[ORM\Column(name: 'descriptifTexte', type: 'text', length: 16777215, nullable: true)]
private $descriptifTexte;
/**
* @var string
*
*/
#[ORM\Column(name: 'descriptifRTF', type: 'text', length: 16777215, nullable: true)]
private $descriptifrtf;
public function __construct()
{
$this->actuv2InfographieRseCarouselMobileFiles = new ArrayCollection();
$this->updatedAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getImageDesktop(): ?string
{
return $this->imageDesktop;
}
public function setImageDesktop(?string $imageDesktop): self
{
$this->imageDesktop = $imageDesktop;
return $this;
}
public function setFileImageDesktop(?File $file = null)
{
$this->fileImageDesktop = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileImageDesktop()
{
return $this->fileImageDesktop;
}
public function getImageThumbnail(): ?string
{
return $this->imageThumbnail;
}
public function setImageThumbnail(?string $imageThumbnail): self
{
$this->imageThumbnail = $imageThumbnail;
return $this;
}
public function setFileImageThumbnail(?File $file = null)
{
$this->fileImageThumbnail = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileImageThumbnail()
{
return $this->fileImageThumbnail;
}
public function getImageThumbnailWebp(): ?string
{
return $this->imageThumbnailWebp;
}
public function setImageThumbnailWebp(?string $imageThumbnailWebp): self
{
$this->imageThumbnailWebp = $imageThumbnailWebp;
return $this;
}
public function setFileImageThumbnailWebp(?File $file = null)
{
$this->fileImageThumbnailWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileImageThumbnailWebp()
{
return $this->fileImageThumbnailWebp;
}
public function getVignetteFooter(): ?string
{
return $this->vignetteFooter;
}
public function setVignetteFooter(?string $vignetteFooter): self
{
$this->vignetteFooter = $vignetteFooter;
return $this;
}
public function setFileVignetteFooter(?File $file = null)
{
$this->fileVignetteFooter = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteLandingPage()
{
return $this->fileVignetteLandingPage;
}
public function getVignetteLandingPage(): ?string
{
return $this->vignetteLandingPage;
}
public function setVignetteLandingPage(?string $vignetteLandingPage): self
{
$this->vignetteLandingPage = $vignetteLandingPage;
return $this;
}
public function setFileVignetteLandingPage(?File $file = null)
{
$this->fileVignetteLandingPage = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteFooter()
{
return $this->fileVignetteFooter;
}
public function getVignetteNewsletter(): ?string
{
return $this->vignetteNewsletter;
}
public function setVignetteNewsletter(?string $vignetteNewsletter): self
{
$this->vignetteNewsletter = $vignetteNewsletter;
return $this;
}
public function setFileVignetteNewsletter(?File $file = null)
{
$this->fileVignetteNewsletter = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteNewsletter()
{
return $this->fileVignetteNewsletter;
}
public function getImageDesktopWebp(): ?string
{
return $this->imageDesktopWebp;
}
public function setImageDesktopWebp(?string $imageDesktopWebp): self
{
$this->imageDesktopWebp = $imageDesktopWebp;
return $this;
}
public function setFileImageDesktopWebp(?File $file = null)
{
$this->fileImageDesktopWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileImageDesktopWebp()
{
return $this->fileImageDesktopWebp;
}
public function getVignetteFooterWebp(): ?string
{
return $this->vignetteFooterWebp;
}
public function setVignetteFooterWebp(?string $vignetteFooterWebp): self
{
$this->vignetteFooterWebp = $vignetteFooterWebp;
return $this;
}
public function setFileVignetteFooterWebp(?File $file = null)
{
$this->fileVignetteFooterWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteLandingPageWebp()
{
return $this->fileVignetteLandingPageWebp;
}
public function getVignetteLandingPageWebp(): ?string
{
return $this->vignetteLandingPageWebp;
}
public function setVignetteLandingPageWebp(?string $vignetteLandingPageWebp): self
{
$this->vignetteLandingPageWebp = $vignetteLandingPageWebp;
return $this;
}
public function setFileVignetteLandingPageWebp(?File $file = null)
{
$this->fileVignetteLandingPageWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteFooterWebp()
{
return $this->fileVignetteFooterWebp;
}
public function getVignetteNewsletterWebp(): ?string
{
return $this->vignetteNewsletterWebp;
}
public function setVignetteNewsletterWebp(?string $vignetteNewsletterWebp): self
{
$this->vignetteNewsletterWebp = $vignetteNewsletterWebp;
return $this;
}
public function setFileVignetteNewsletterWebp(?File $file = null)
{
$this->fileVignetteNewsletterWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteNewsletterWebp()
{
return $this->fileVignetteNewsletterWebp;
}
/**
* @return Collection<int, Actuv2InfographieRseCarouselMobileFile>
*/
public function getActuv2InfographieRseCarouselMobileFiles(): Collection
{
return $this->actuv2InfographieRseCarouselMobileFiles;
}
public function addActuv2InfographieRseCarouselMobileFile(Actuv2InfographieRseCarouselMobileFile $actuv2InfographieRseCarouselMobileFile): self
{
if (!$this->actuv2InfographieRseCarouselMobileFiles->contains($actuv2InfographieRseCarouselMobileFile)) {
$this->actuv2InfographieRseCarouselMobileFiles[] = $actuv2InfographieRseCarouselMobileFile;
$actuv2InfographieRseCarouselMobileFile->setActuv2InfographieRse($this);
}
return $this;
}
public function removeActuv2InfographieRseCarouselMobileFile(Actuv2InfographieRseCarouselMobileFile $actuv2InfographieRseCarouselMobileFile): self
{
if ($this->actuv2InfographieRseCarouselMobileFiles->removeElement($actuv2InfographieRseCarouselMobileFile)) {
// set the owning side to null (unless already changed)
if ($actuv2InfographieRseCarouselMobileFile->getActuv2InfographieRse() === $this) {
$actuv2InfographieRseCarouselMobileFile->setActuv2InfographieRse(null);
}
}
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getVignetteArchivage(): ?string
{
return $this->vignetteArchivage;
}
public function setVignetteArchivage(?string $vignetteArchivage): self
{
$this->vignetteArchivage = $vignetteArchivage;
return $this;
}
public function setFileVignetteArchivage(?File $file = null)
{
$this->fileVignetteArchivage = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteArchivage()
{
return $this->fileVignetteArchivage;
}
public function getVignetteArchivageWebp(): ?string
{
return $this->vignetteArchivageWebp;
}
public function setVignetteArchivageWebp(?string $vignetteArchivageWebp): self
{
$this->vignetteArchivageWebp = $vignetteArchivageWebp;
return $this;
}
public function setFileVignetteArchivageWebp(?File $file = null)
{
$this->fileVignetteArchivageWebp = $file;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getFileVignetteArchivageWebp()
{
return $this->fileVignetteArchivageWebp;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getDescriptiftexte(): ?string
{
return $this->descriptifTexte;
}
public function setDescriptiftexte(string $descriptifTexte): self
{
$this->descriptifTexte = $descriptifTexte;
return $this;
}
public function getDescriptifrtf(): ?string
{
return $this->descriptifrtf;
}
public function setDescriptifrtf(string $descriptifrtf): self
{
$this->descriptifrtf = $descriptifrtf;
$descriptifTexte = str_replace(' ', ' ', $descriptifrtf);
$descriptifTexte = str_replace('<br />', ' ', $descriptifTexte);
$descriptifTexte = strip_tags($descriptifTexte);
$this->descriptifTexte = $descriptifTexte;
return $this;
}
}