<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\Actuv2BienetreRepository;
use Symfony\Component\Validator\Constraints\Date;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\HttpFoundation\File\File;
/**
* Actuv2Bienetre
*
* @Vich\Uploadable
*/
#[ORM\Table(name: 'actuv2_bienEtre')]
#[ORM\Entity(repositoryClass: Actuv2BienetreRepository::class)]
class Actuv2Bienetre
{
/**
* @var int
*
*/
#[ORM\Column(name: 'id', type: 'bigint', nullable: false)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private $id;
/**
* @var \DateTime|null
*
*/
#[ORM\Column(name: 'date', type: 'date', nullable: true, options: ['comment' => 'période'])]
private $date;
/**
* @var string
*
*/
#[ORM\Column(name: 'titre', type: 'string', length: 255, nullable: false)]
private $titre = '';
#[ORM\Column(name: 'descriptifHeaderTexte', type: 'text', length: 16777215, nullable: true)]
private $descriptifHeaderTexte;
/**
* @var string
*
*/
#[ORM\Column(name: 'descriptifHeaderRTF', type: 'text', length: 16777215, nullable: true)]
private $descriptifHeaderrtf;
/**
* @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;
/**
* @var string
*
*/
#[ORM\Column(name: 'image1', nullable: true, type: 'string', length: 255, options: ['comment' => 'format paysage'])]
private $image1 = "";
/**
* @var string
*
*/
#[ORM\Column(name: 'image2', nullable: true, type: 'string', length: 255, options: ['comment' => 'format portrait'])]
private $image2 = "";
/**
* @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image1")
* @var File|null
*/
private $tmpImage1 = null;
/**
* @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image2")
* @var File|null
*/
private $tmpImage2 = null;
/**
* @var string
*
*/
#[ORM\Column(nullable: true, type: 'string', length: 255, options: ['comment' => 'format paysage'])]
private $image1Webp = "";
/**
* @var string
*
*/
#[ORM\Column(nullable: true, type: 'string', length: 255, options: ['comment' => 'format portrait'])]
private $image2Webp = "";
/**
* @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image1Webp")
* @var File|null
*/
private $tmpImage1Webp = null;
/**
* @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image2Webp")
* @var File|null
*/
private $tmpImage2Webp = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private $updatedAt;
public function getId(): ?string
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getDescriptifHeadertexte(): ?string
{
return $this->descriptifHeaderTexte;
}
public function setDescriptifHeadertexte(string $descriptifHeaderTexte): self
{
$this->descriptifHeaderTexte = $descriptifHeaderTexte;
return $this;
}
public function getDescriptifHeaderrtf(): ?string
{
return $this->descriptifHeaderrtf;
}
public function setDescriptifHeaderrtf(string $descriptifHeaderrtf): self
{
$this->descriptifHeaderrtf = $descriptifHeaderrtf;
$descriptifHeaderTexte = str_replace(' ', ' ', $descriptifHeaderrtf);
$descriptifHeaderTexte = str_replace('<br />', ' ', $descriptifHeaderTexte);
$descriptifHeaderTexte = strip_tags($descriptifHeaderTexte);
$this->descriptifHeaderTexte = $descriptifHeaderTexte;
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;
}
public function getImage1(): ?string
{
return $this->image1;
}
public function setImage1(?string $image1): self
{
$this->image1 = is_null($image1) ? "" : $image1;
return $this;
}
public function getImage2(): ?string
{
return $this->image2;
}
public function setImage2(?string $image2): self
{
$this->image2 = is_null($image2) ? "" : $image2;
return $this;
}
public function setTmpImage1(?File $tmpImage1 = null): void
{
$this->tmpImage1 = $tmpImage1;
$this->updatedAt = new \DateTime('now');
}
public function getTmpImage1(): ?File
{
return $this->tmpImage1;
}
public function setTmpImage2(?File $tmpImage2 = null): void
{
$this->tmpImage2 = $tmpImage2;
$this->updatedAt = new \DateTime('now');
}
public function getTmpImage2(): ?File
{
return $this->tmpImage2;
}
public function getImage1Webp(): ?string
{
return $this->image1Webp;
}
public function setImage1Webp(?string $image1Webp): self
{
$this->image1Webp = is_null($image1Webp) ? "" : $image1Webp;
return $this;
}
public function getImage2Webp(): ?string
{
return $this->image2Webp;
}
public function setImage2Webp(?string $image2Webp): self
{
$this->image2Webp = is_null($image2Webp) ? "" : $image2Webp;
return $this;
}
public function setTmpImage1Webp(?File $tmpImage1Webp = null): void
{
$this->tmpImage1Webp = $tmpImage1Webp;
$this->updatedAt = new \DateTime('now');
}
public function getTmpImage1Webp(): ?File
{
return $this->tmpImage1Webp;
}
public function setTmpImage2Webp(?File $tmpImage2Webp = null): void
{
$this->tmpImage2Webp = $tmpImage2Webp;
$this->updatedAt = new \DateTime('now');
}
public function getTmpImage2Webp(): ?File
{
return $this->tmpImage2Webp;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
}