src/Entity/Actuv2Bienetre.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\Actuv2BienetreRepository;
  5. use Symfony\Component\Validator\Constraints\Date;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. /**
  9.  * Actuv2Bienetre
  10.  *
  11.  * @Vich\Uploadable
  12.  */
  13. #[ORM\Table(name'actuv2_bienEtre')]
  14. #[ORM\Entity(repositoryClassActuv2BienetreRepository::class)]
  15. class Actuv2Bienetre
  16. {
  17.     /**
  18.      * @var int
  19.      *
  20.      */
  21.     #[ORM\Column(name'id'type'bigint'nullablefalse)]
  22.     #[ORM\Id]
  23.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  24.     private $id;
  25.     /**
  26.      * @var \DateTime|null
  27.      *
  28.      */
  29.     #[ORM\Column(name'date'type'date'nullabletrueoptions: ['comment' => 'pĂ©riode'])]
  30.     private $date;
  31.     /**
  32.      * @var string
  33.      *
  34.      */
  35.     #[ORM\Column(name'titre'type'string'length255nullablefalse)]
  36.     private $titre '';
  37.     #[ORM\Column(name'descriptifHeaderTexte'type'text'length16777215nullabletrue)]
  38.     private $descriptifHeaderTexte;
  39.     /**
  40.      * @var string
  41.      *
  42.      */
  43.     #[ORM\Column(name'descriptifHeaderRTF'type'text'length16777215nullabletrue)]
  44.     private $descriptifHeaderrtf;
  45.     /**
  46.      * @var string
  47.      *
  48.      */
  49.     #[ORM\Column(name'descriptifTexte'type'text'length16777215nullabletrue)]
  50.     private $descriptifTexte;
  51.     /**
  52.      * @var string
  53.      *
  54.      */
  55.     #[ORM\Column(name'descriptifRTF'type'text'length16777215nullabletrue)]
  56.     private $descriptifrtf;
  57.     /**
  58.      * @var string
  59.      *
  60.      */
  61.     #[ORM\Column(name'image1'nullabletruetype'string'length255options: ['comment' => 'format paysage'])]
  62.     private $image1 "";
  63.     /**
  64.      * @var string
  65.      *
  66.      */
  67.     #[ORM\Column(name'image2'nullabletruetype'string'length255options: ['comment' => 'format portrait'])]
  68.     private $image2 "";
  69.     /**
  70.      * @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image1")
  71.      * @var File|null
  72.      */
  73.     private $tmpImage1 null;
  74.     /**
  75.      * @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image2")
  76.      * @var File|null
  77.      */
  78.     private $tmpImage2 null;
  79.     /**
  80.      * @var string
  81.      *
  82.      */
  83.     #[ORM\Column(nullabletruetype'string'length255options: ['comment' => 'format paysage'])]
  84.     private $image1Webp "";
  85.     /**
  86.      * @var string
  87.      *
  88.      */
  89.     #[ORM\Column(nullabletruetype'string'length255options: ['comment' => 'format portrait'])]
  90.     private $image2Webp "";
  91.     /**
  92.      * @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image1Webp")
  93.      * @var File|null
  94.      */
  95.     private $tmpImage1Webp null;
  96.     /**
  97.      * @Vich\UploadableField(mapping="actuv2bienetre", fileNameProperty="image2Webp")
  98.      * @var File|null
  99.      */
  100.     private $tmpImage2Webp null;
  101.     #[ORM\Column(type'datetime'nullabletrue)]
  102.     private $updatedAt;
  103.     public function getId(): ?string
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function getDate(): ?\DateTimeInterface
  108.     {
  109.         return $this->date;
  110.     }
  111.     public function setDate(?\DateTimeInterface $date): self
  112.     {
  113.         $this->date $date;
  114.         return $this;
  115.     }
  116.     public function getTitre(): ?string
  117.     {
  118.         return $this->titre;
  119.     }
  120.     public function setTitre(string $titre): self
  121.     {
  122.         $this->titre $titre;
  123.         return $this;
  124.     }
  125.     public function getDescriptifHeadertexte(): ?string
  126.     {
  127.         return $this->descriptifHeaderTexte;
  128.     }
  129.     public function setDescriptifHeadertexte(string $descriptifHeaderTexte): self
  130.     {
  131.         $this->descriptifHeaderTexte $descriptifHeaderTexte;
  132.         return $this;
  133.     }
  134.     public function getDescriptifHeaderrtf(): ?string
  135.     {
  136.         return $this->descriptifHeaderrtf;
  137.     }
  138.     public function setDescriptifHeaderrtf(string $descriptifHeaderrtf): self
  139.     {
  140.         $this->descriptifHeaderrtf $descriptifHeaderrtf;
  141.         $descriptifHeaderTexte str_replace('&nbsp;'' '$descriptifHeaderrtf);
  142.         $descriptifHeaderTexte str_replace('<br />'' '$descriptifHeaderTexte);
  143.         $descriptifHeaderTexte strip_tags($descriptifHeaderTexte);
  144.         $this->descriptifHeaderTexte $descriptifHeaderTexte;
  145.         return $this;
  146.     }
  147.     public function getDescriptiftexte(): ?string
  148.     {
  149.         return $this->descriptifTexte;
  150.     }
  151.     public function setDescriptiftexte(string $descriptifTexte): self
  152.     {
  153.         $this->descriptifTexte $descriptifTexte;
  154.         return $this;
  155.     }
  156.     public function getDescriptifrtf(): ?string
  157.     {
  158.         return $this->descriptifrtf;
  159.     }
  160.     public function setDescriptifrtf(string $descriptifrtf): self
  161.     {
  162.         $this->descriptifrtf $descriptifrtf;
  163.         $descriptifTexte str_replace('&nbsp;'' '$descriptifrtf);
  164.         $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  165.         $descriptifTexte strip_tags($descriptifTexte);
  166.         $this->descriptifTexte $descriptifTexte;
  167.         return $this;
  168.     }
  169.     public function getImage1(): ?string
  170.     {
  171.         return $this->image1;
  172.     }
  173.     public function setImage1(?string $image1): self
  174.     {
  175.         $this->image1 is_null($image1) ? "" $image1;
  176.         return $this;
  177.     }
  178.     public function getImage2(): ?string
  179.     {
  180.         return $this->image2;
  181.     }
  182.     public function setImage2(?string $image2): self
  183.     {
  184.         $this->image2 is_null($image2) ? "" $image2;
  185.         return $this;
  186.     }
  187.     public function setTmpImage1(?File $tmpImage1 null): void
  188.     {
  189.         $this->tmpImage1 $tmpImage1;
  190.         $this->updatedAt = new \DateTime('now');
  191.     }
  192.     public function getTmpImage1(): ?File
  193.     {
  194.         return $this->tmpImage1;
  195.     }
  196.     public function setTmpImage2(?File $tmpImage2 null): void
  197.     {
  198.         $this->tmpImage2 $tmpImage2;
  199.         $this->updatedAt = new \DateTime('now');
  200.     }
  201.     public function getTmpImage2(): ?File
  202.     {
  203.         return $this->tmpImage2;
  204.     }
  205.     public function getImage1Webp(): ?string
  206.     {
  207.         return $this->image1Webp;
  208.     }
  209.     public function setImage1Webp(?string $image1Webp): self
  210.     {
  211.         $this->image1Webp is_null($image1Webp) ? "" $image1Webp;
  212.         return $this;
  213.     }
  214.     public function getImage2Webp(): ?string
  215.     {
  216.         return $this->image2Webp;
  217.     }
  218.     public function setImage2Webp(?string $image2Webp): self
  219.     {
  220.         $this->image2Webp is_null($image2Webp) ? "" $image2Webp;
  221.         return $this;
  222.     }
  223.     public function setTmpImage1Webp(?File $tmpImage1Webp null): void
  224.     {
  225.         $this->tmpImage1Webp $tmpImage1Webp;
  226.         $this->updatedAt = new \DateTime('now');
  227.     }
  228.     public function getTmpImage1Webp(): ?File
  229.     {
  230.         return $this->tmpImage1Webp;
  231.     }
  232.     public function setTmpImage2Webp(?File $tmpImage2Webp null): void
  233.     {
  234.         $this->tmpImage2Webp $tmpImage2Webp;
  235.         $this->updatedAt = new \DateTime('now');
  236.     }
  237.     public function getTmpImage2Webp(): ?File
  238.     {
  239.         return $this->tmpImage2Webp;
  240.     }
  241.     public function getUpdatedAt(): ?\DateTimeInterface
  242.     {
  243.         return $this->updatedAt;
  244.     }
  245.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  246.     {
  247.         $this->updatedAt $updatedAt;
  248.         return $this;
  249.     }
  250. }