src/Entity/Actuv2Actualite.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\Actuv2ActualiteRepository;
  7. use Symfony\Component\Validator\Constraints\Date;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. /**
  11.  * Actuv2Actualite
  12.  *
  13.  * @Vich\Uploadable
  14.  */
  15. #[ORM\Table(name'actuv2_actualite')]
  16. #[ORM\Entity(repositoryClassActuv2ActualiteRepository::class)]
  17. class Actuv2Actualite
  18. {
  19.     /**
  20.      * @var int
  21.      *
  22.      */
  23.     #[ORM\Column(name'id'type'bigint'nullablefalse)]
  24.     #[ORM\Id]
  25.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  26.     private $id;
  27.     /**
  28.      * @var \Date|null
  29.      *
  30.      */
  31.     #[ORM\Column(name'date'type'date'nullabletrueoptions: ['comment' => 'pĂ©riode'])]
  32.     private $date;
  33.     /**
  34.      * @var string
  35.      *
  36.      */
  37.     #[ORM\Column(name'titre'type'string'length255nullablefalse)]
  38.     private $titre '';
  39.     /**
  40.      * @var string
  41.      *
  42.      */
  43.     #[ORM\Column(name'source'type'string'length255nullabletrue)]
  44.     private $source null;
  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(type'text'length16777215nullabletrue)]
  62.     private $descriptifHeaderTexte;
  63.     /**
  64.      * @var string
  65.      *
  66.      */
  67.     #[ORM\Column(type'text'length16777215nullabletrue)]
  68.     private $descriptifHeaderrtf;
  69.     /**
  70.      * @var string
  71.      *
  72.      */
  73.     #[ORM\Column(name'image1'nullabletruetype'string'length255options: ['comment' => 'format paysage'])]
  74.     private $image1 "";
  75.     /**
  76.      * @var string
  77.      *
  78.      */
  79.     #[ORM\Column(name'image2'nullabletruetype'string'length255options: ['comment' => 'format portrait'])]
  80.     private $image2 "";
  81.     /**
  82.      * @var string
  83.      *
  84.      */
  85.     #[ORM\Column(name'image3'nullabletruetype'string'length255options: ['comment' => 'format panoramique'])]
  86.     private $image3 "";
  87.     /**
  88.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image1")
  89.      * @var File|null
  90.      */
  91.     private $tmpImage1 null;
  92.     /**
  93.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image2")
  94.      * @var File|null
  95.      */
  96.     private $tmpImage2 null;
  97.     /**
  98.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image3")
  99.      * @var File|null
  100.      */
  101.     private $tmpImage3 null;
  102.     /**
  103.      * @var string
  104.      *
  105.      */
  106.     #[ORM\Column(nullabletruetype'string'length255options: ['comment' => 'format paysage webp'])]
  107.     private $image1Webp "";
  108.     /**
  109.      * @var string
  110.      *
  111.      */
  112.     #[ORM\Column(nullabletruetype'string'length255options: ['comment' => 'format portrait webp'])]
  113.     private $image2Webp "";
  114.     /**
  115.      * @var string
  116.      *
  117.      */
  118.     #[ORM\Column(nullabletruetype'string'length255options: ['comment' => 'format panoramique webp'])]
  119.     private $image3Webp "";
  120.     /**
  121.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image1Webp")
  122.      * @var File|null
  123.      */
  124.     private $tmpImage1Webp null;
  125.     /**
  126.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image2Webp")
  127.      * @var File|null
  128.      */
  129.     private $tmpImage2Webp null;
  130.     /**
  131.      * @Vich\UploadableField(mapping="actuv2actualite", fileNameProperty="image3Webp")
  132.      * @var File|null
  133.      */
  134.     private $tmpImage3Webp null;
  135.     #[ORM\Column(type'boolean')]
  136.     private $actuPrimary;
  137.     #[ORM\Column(type'datetime'nullabletrue)]
  138.     private $updatedAt;
  139.     #[ORM\Column(type'string'length255nullabletrue)]
  140.     private $category;
  141.     public function getId(): ?string
  142.     {
  143.         return $this->id;
  144.     }
  145.     public function getDate(): ?\DateTimeInterface
  146.     {
  147.         return $this->date;
  148.     }
  149.     public function setDate(?\DateTimeInterface $date): self
  150.     {
  151.         $this->date $date;
  152.         return $this;
  153.     }
  154.     public function getTitre(): ?string
  155.     {
  156.         return $this->titre;
  157.     }
  158.     public function setTitre(string $titre): self
  159.     {
  160.         $this->titre $titre;
  161.         return $this;
  162.     }
  163.     public function getSource(): ?string
  164.     {
  165.         return $this->source;
  166.     }
  167.     public function setSource(?string $source): self
  168.     {
  169.         $this->source $source;
  170.         return $this;
  171.     }
  172.     public function getDescriptiftexte(): ?string
  173.     {
  174.         return $this->descriptifTexte;
  175.     }
  176.     public function setDescriptiftexte(string $descriptifTexte): self
  177.     {
  178.         $this->descriptifTexte $descriptifTexte;
  179.         return $this;
  180.     }
  181.     public function getDescriptifrtf(): ?string
  182.     {
  183.         return $this->descriptifrtf;
  184.     }
  185.     public function setDescriptifrtf(string $descriptifrtf): self
  186.     {
  187.         $this->descriptifrtf $descriptifrtf;
  188.         $descriptifTexte str_replace('&nbsp;'' '$descriptifrtf);
  189.         $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  190.         $descriptifTexte strip_tags($descriptifTexte);
  191.         $this->descriptifTexte $descriptifTexte;
  192.         return $this;
  193.     }
  194.     public function getDescriptifHeaderTexte(): ?string
  195.     {
  196.         return $this->descriptifHeaderTexte;
  197.     }
  198.     public function setDescriptifHeaderTexte(string $descriptifHeaderTexte): self
  199.     {
  200.         $this->descriptifHeaderTexte $descriptifHeaderTexte;
  201.         return $this;
  202.     }
  203.     public function getDescriptifHeaderrtf(): ?string
  204.     {
  205.         return $this->descriptifHeaderrtf;
  206.     }
  207.     public function setDescriptifHeaderrtf(string $descriptifHeaderrtf): self
  208.     {
  209.         $this->descriptifHeaderrtf $descriptifHeaderrtf;
  210.         $descriptifHeaderTexte str_replace('&nbsp;'' '$descriptifHeaderrtf);
  211.         $descriptifHeaderTexte str_replace('<br />'' '$descriptifHeaderTexte);
  212.         $descriptifHeaderTexte strip_tags($descriptifHeaderTexte);
  213.         $this->descriptifHeaderTexte $descriptifHeaderTexte;
  214.         return $this;
  215.     }
  216.     public function getImage1(): ?string
  217.     {
  218.         return $this->image1;
  219.     }
  220.     public function setImage1(?string $image1): self
  221.     {
  222.         $this->image1 is_null($image1) ? "" $image1;
  223.         return $this;
  224.     }
  225.     public function getImage2(): ?string
  226.     {
  227.         return $this->image2;
  228.     }
  229.     public function setImage2(?string $image2): self
  230.     {
  231.         $this->image2 is_null($image2) ? "" $image2;
  232.         return $this;
  233.     }
  234.     public function getImage3(): ?string
  235.     {
  236.         return $this->image3;
  237.     }
  238.     public function setImage3(?string $image3): self
  239.     {
  240.         $this->image3 is_null($image3) ? "" $image3;
  241.         return $this;
  242.     }
  243.     public function setTmpImage1(?File $tmpImage1 null): void
  244.     {
  245.         $this->tmpImage1 $tmpImage1;
  246.         $this->updatedAt = new \DateTime('now');
  247.     }
  248.     public function getTmpImage1(): ?File
  249.     {
  250.         return $this->tmpImage1;
  251.     }
  252.     public function setTmpImage2(?File $tmpImage2 null): void
  253.     {
  254.         $this->tmpImage2 $tmpImage2;
  255.         $this->updatedAt = new \DateTime('now');
  256.     }
  257.     public function getTmpImage2(): ?File
  258.     {
  259.         return $this->tmpImage2;
  260.     }
  261.     public function setTmpImage3(?File $tmpImage3 null): void
  262.     {
  263.         $this->tmpImage3 $tmpImage3;
  264.         $this->updatedAt = new \DateTime('now');
  265.     }
  266.     public function getTmpImage3(): ?File
  267.     {
  268.         return $this->tmpImage3;
  269.     }
  270.     public function getImage1Webp(): ?string
  271.     {
  272.         return $this->image1Webp;
  273.     }
  274.     public function setImage1Webp(?string $image1Webp): self
  275.     {
  276.         $this->image1Webp is_null($image1Webp) ? "" $image1Webp;
  277.         return $this;
  278.     }
  279.     public function getImage2Webp(): ?string
  280.     {
  281.         return $this->image2Webp;
  282.     }
  283.     public function setImage2Webp(?string $image2Webp): self
  284.     {
  285.         $this->image2Webp is_null($image2Webp) ? "" $image2Webp;
  286.         return $this;
  287.     }
  288.     public function getImage3Webp(): ?string
  289.     {
  290.         return $this->image3Webp;
  291.     }
  292.     public function setImage3Webp(?string $image3Webp): self
  293.     {
  294.         $this->image3Webp is_null($image3Webp) ? "" $image3Webp;
  295.         return $this;
  296.     }
  297.     public function setTmpImage1Webp(?File $tmpImage1Webp null): void
  298.     {
  299.         $this->tmpImage1Webp $tmpImage1Webp;
  300.         $this->updatedAt = new \DateTime('now');
  301.     }
  302.     public function getTmpImage1Webp(): ?File
  303.     {
  304.         return $this->tmpImage1Webp;
  305.     }
  306.     public function setTmpImage2Webp(?File $tmpImage2Webp null): void
  307.     {
  308.         $this->tmpImage2Webp $tmpImage2Webp;
  309.         $this->updatedAt = new \DateTime('now');
  310.     }
  311.     public function getTmpImage2Webp(): ?File
  312.     {
  313.         return $this->tmpImage2Webp;
  314.     }
  315.     public function setTmpImage3Webp(?File $tmpImage3Webp null): void
  316.     {
  317.         $this->tmpImage3Webp $tmpImage3Webp;
  318.         $this->updatedAt = new \DateTime('now');
  319.     }
  320.     public function getTmpImage3Webp(): ?File
  321.     {
  322.         return $this->tmpImage3Webp;
  323.     }
  324.     public function getUpdatedAt(): ?\DateTimeInterface
  325.     {
  326.         return $this->updatedAt;
  327.     }
  328.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  329.     {
  330.         $this->updatedAt $updatedAt;
  331.         return $this;
  332.     }
  333.     public function getActuPrimary(): ?bool
  334.     {
  335.         return $this->actuPrimary;
  336.     }
  337.     public function setActuPrimary(bool $actuPrimary): self
  338.     {
  339.         $this->actuPrimary $actuPrimary;
  340.         return $this;
  341.     }
  342.     public function getCategory(): ?string
  343.     {
  344.         return $this->category;
  345.     }
  346.     public function setCategory(?string $category): self
  347.     {
  348.         $this->category $category;
  349.         return $this;
  350.     }
  351. }