src/Entity/Actuv2InfographieRse.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\Actuv2InfographieRseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. /**
  10.  * @Vich\Uploadable
  11.  */
  12. #[ORM\Entity(repositoryClassActuv2InfographieRseRepository::class)]
  13. class Actuv2InfographieRse
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     private $id;
  19.     #[ORM\Column(name'date'type'date'nullabletrueoptions: ['comment' => 'pĂ©riode'])]
  20.     private $date;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private ?string $imageDesktop null;
  23.     /**
  24.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageDesktop")
  25.      * @var File
  26.      */
  27.     private $fileImageDesktop;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private ?string $imageThumbnail null;
  30.     /**
  31.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageThumbnail")
  32.      * @var File
  33.      */
  34.     private $fileImageThumbnail;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private ?string $imageThumbnailWebp null;
  37.     /**
  38.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageThumbnailWebp")
  39.      * @var File
  40.      */
  41.     private $fileImageThumbnailWebp;
  42.     #[ORM\Column(type'string'length255nullabletrue)]
  43.     private ?string $vignetteFooter null;
  44.     /**
  45.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteFooter")
  46.      * @var File
  47.      */
  48.     private $fileVignetteFooter;
  49.     #[ORM\Column(type'string'length255nullabletrue)]
  50.     private ?string $vignetteLandingPage null;
  51.     /**
  52.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteLandingPage")
  53.      * @var File
  54.      */
  55.     private $fileVignetteLandingPage;
  56.     #[ORM\Column(type'string'length255nullabletrue)]
  57.     private ?string $vignetteNewsletter null;
  58.     /**
  59.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteNewsletter")
  60.      * @var File
  61.      */
  62.     private $fileVignetteNewsletter;
  63.     #[ORM\Column(type'string'length255nullabletrue)]
  64.     private ?string $imageDesktopWebp null;
  65.     /**
  66.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="imageDesktopWebp")
  67.      * @var File
  68.      */
  69.     private $fileImageDesktopWebp;
  70.     #[ORM\Column(type'string'length255nullabletrue)]
  71.     private ?string $vignetteFooterWebp null;
  72.     /**
  73.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteFooterWebp")
  74.      * @var File
  75.      */
  76.     private $fileVignetteFooterWebp;
  77.     #[ORM\Column(type'string'length255nullabletrue)]
  78.     private ?string $vignetteLandingPageWebp null;
  79.     /**
  80.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteLandingPageWebp")
  81.      * @var File
  82.      */
  83.     private $fileVignetteLandingPageWebp;
  84.     #[ORM\Column(type'string'length255nullabletrue)]
  85.     private ?string $vignetteNewsletterWebp null;
  86.     /**
  87.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteNewsletterWebp")
  88.      * @var File
  89.      */
  90.     private $fileVignetteNewsletterWebp;
  91.     #[ORM\OneToMany(mappedBy'actuv2InfographieRse'targetEntityActuv2InfographieRseCarouselMobileFile::class, orphanRemovaltruecascade: ['persist''remove'])]
  92.     private $actuv2InfographieRseCarouselMobileFiles;
  93.     #[ORM\Column(type'datetime')]
  94.     private $updatedAt;
  95.     #[ORM\Column(type'string'length255nullabletrue)]
  96.     private $vignetteArchivage;
  97.     /**
  98.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteArchivage")
  99.      * @var File
  100.      */
  101.     private $fileVignetteArchivage;
  102.     #[ORM\Column(type'string'length255nullabletrue)]
  103.     private $vignetteArchivageWebp;
  104.     /**
  105.      * @Vich\UploadableField(mapping="actuv2_infographie_rse_file", fileNameProperty="vignetteArchivageWebp")
  106.      * @var File
  107.      */
  108.     private $fileVignetteArchivageWebp;
  109.     #[ORM\Column(type'string'length255nullabletrue)]
  110.     private $title;
  111.     /**
  112.      * @var string
  113.      *
  114.      */
  115.     #[ORM\Column(name'descriptifTexte'type'text'length16777215nullabletrue)]
  116.     private $descriptifTexte;
  117.     /**
  118.      * @var string
  119.      *
  120.      */
  121.     #[ORM\Column(name'descriptifRTF'type'text'length16777215nullabletrue)]
  122.     private $descriptifrtf;
  123.     public function __construct()
  124.     {
  125.         $this->actuv2InfographieRseCarouselMobileFiles = new ArrayCollection();
  126.         $this->updatedAt = new \DateTime();
  127.     }
  128.     public function getId(): ?int
  129.     {
  130.         return $this->id;
  131.     }
  132.     public function getDate(): ?\DateTimeInterface
  133.     {
  134.         return $this->date;
  135.     }
  136.     public function setDate(?\DateTimeInterface $date): self
  137.     {
  138.         $this->date $date;
  139.         return $this;
  140.     }
  141.     public function getImageDesktop(): ?string
  142.     {
  143.         return $this->imageDesktop;
  144.     }
  145.     public function setImageDesktop(?string $imageDesktop): self
  146.     {
  147.         $this->imageDesktop $imageDesktop;
  148.         return $this;
  149.     }
  150.     public function setFileImageDesktop(?File $file null)
  151.     {
  152.         $this->fileImageDesktop $file;
  153.         // VERY IMPORTANT:
  154.         // It is required that at least one field changes if you are using Doctrine,
  155.         // otherwise the event listeners won't be called and the file is lost
  156.         if ($file) {
  157.             // if 'updatedAt' is not defined in your entity, use another property
  158.             $this->updatedAt = new \DateTime('now');
  159.         }
  160.     }
  161.     public function getFileImageDesktop()
  162.     {
  163.         return $this->fileImageDesktop;
  164.     }
  165.     public function getImageThumbnail(): ?string
  166.     {
  167.         return $this->imageThumbnail;
  168.     }
  169.     public function setImageThumbnail(?string $imageThumbnail): self
  170.     {
  171.         $this->imageThumbnail $imageThumbnail;
  172.         return $this;
  173.     }
  174.     public function setFileImageThumbnail(?File $file null)
  175.     {
  176.         $this->fileImageThumbnail $file;
  177.         // VERY IMPORTANT:
  178.         // It is required that at least one field changes if you are using Doctrine,
  179.         // otherwise the event listeners won't be called and the file is lost
  180.         if ($file) {
  181.             // if 'updatedAt' is not defined in your entity, use another property
  182.             $this->updatedAt = new \DateTime('now');
  183.         }
  184.     }
  185.     public function getFileImageThumbnail()
  186.     {
  187.         return $this->fileImageThumbnail;
  188.     }
  189.     public function getImageThumbnailWebp(): ?string
  190.     {
  191.         return $this->imageThumbnailWebp;
  192.     }
  193.     public function setImageThumbnailWebp(?string $imageThumbnailWebp): self
  194.     {
  195.         $this->imageThumbnailWebp $imageThumbnailWebp;
  196.         return $this;
  197.     }
  198.     public function setFileImageThumbnailWebp(?File $file null)
  199.     {
  200.         $this->fileImageThumbnailWebp $file;
  201.         // VERY IMPORTANT:
  202.         // It is required that at least one field changes if you are using Doctrine,
  203.         // otherwise the event listeners won't be called and the file is lost
  204.         if ($file) {
  205.             // if 'updatedAt' is not defined in your entity, use another property
  206.             $this->updatedAt = new \DateTime('now');
  207.         }
  208.     }
  209.     public function getFileImageThumbnailWebp()
  210.     {
  211.         return $this->fileImageThumbnailWebp;
  212.     }
  213.     public function getVignetteFooter(): ?string
  214.     {
  215.         return $this->vignetteFooter;
  216.     }
  217.     public function setVignetteFooter(?string $vignetteFooter): self
  218.     {
  219.         $this->vignetteFooter $vignetteFooter;
  220.         return $this;
  221.     }
  222.     public function setFileVignetteFooter(?File $file null)
  223.     {
  224.         $this->fileVignetteFooter $file;
  225.         // VERY IMPORTANT:
  226.         // It is required that at least one field changes if you are using Doctrine,
  227.         // otherwise the event listeners won't be called and the file is lost
  228.         if ($file) {
  229.             // if 'updatedAt' is not defined in your entity, use another property
  230.             $this->updatedAt = new \DateTime('now');
  231.         }
  232.     }
  233.     public function getFileVignetteLandingPage()
  234.     {
  235.         return $this->fileVignetteLandingPage;
  236.     }
  237.     public function getVignetteLandingPage(): ?string
  238.     {
  239.         return $this->vignetteLandingPage;
  240.     }
  241.     public function setVignetteLandingPage(?string $vignetteLandingPage): self
  242.     {
  243.         $this->vignetteLandingPage $vignetteLandingPage;
  244.         return $this;
  245.     }
  246.     public function setFileVignetteLandingPage(?File $file null)
  247.     {
  248.         $this->fileVignetteLandingPage $file;
  249.         // VERY IMPORTANT:
  250.         // It is required that at least one field changes if you are using Doctrine,
  251.         // otherwise the event listeners won't be called and the file is lost
  252.         if ($file) {
  253.             // if 'updatedAt' is not defined in your entity, use another property
  254.             $this->updatedAt = new \DateTime('now');
  255.         }
  256.     }
  257.     public function getFileVignetteFooter()
  258.     {
  259.         return $this->fileVignetteFooter;
  260.     }
  261.     public function getVignetteNewsletter(): ?string
  262.     {
  263.         return $this->vignetteNewsletter;
  264.     }
  265.     public function setVignetteNewsletter(?string $vignetteNewsletter): self
  266.     {
  267.         $this->vignetteNewsletter $vignetteNewsletter;
  268.         return $this;
  269.     }
  270.     public function setFileVignetteNewsletter(?File $file null)
  271.     {
  272.         $this->fileVignetteNewsletter $file;
  273.         // VERY IMPORTANT:
  274.         // It is required that at least one field changes if you are using Doctrine,
  275.         // otherwise the event listeners won't be called and the file is lost
  276.         if ($file) {
  277.             // if 'updatedAt' is not defined in your entity, use another property
  278.             $this->updatedAt = new \DateTime('now');
  279.         }
  280.     }
  281.     public function getFileVignetteNewsletter()
  282.     {
  283.         return $this->fileVignetteNewsletter;
  284.     }
  285.     public function getImageDesktopWebp(): ?string
  286.     {
  287.         return $this->imageDesktopWebp;
  288.     }
  289.     public function setImageDesktopWebp(?string $imageDesktopWebp): self
  290.     {
  291.         $this->imageDesktopWebp $imageDesktopWebp;
  292.         return $this;
  293.     }
  294.     public function setFileImageDesktopWebp(?File $file null)
  295.     {
  296.         $this->fileImageDesktopWebp $file;
  297.         // VERY IMPORTANT:
  298.         // It is required that at least one field changes if you are using Doctrine,
  299.         // otherwise the event listeners won't be called and the file is lost
  300.         if ($file) {
  301.             // if 'updatedAt' is not defined in your entity, use another property
  302.             $this->updatedAt = new \DateTime('now');
  303.         }
  304.     }
  305.     public function getFileImageDesktopWebp()
  306.     {
  307.         return $this->fileImageDesktopWebp;
  308.     }
  309.     public function getVignetteFooterWebp(): ?string
  310.     {
  311.         return $this->vignetteFooterWebp;
  312.     }
  313.     public function setVignetteFooterWebp(?string $vignetteFooterWebp): self
  314.     {
  315.         $this->vignetteFooterWebp $vignetteFooterWebp;
  316.         return $this;
  317.     }
  318.     public function setFileVignetteFooterWebp(?File $file null)
  319.     {
  320.         $this->fileVignetteFooterWebp $file;
  321.         // VERY IMPORTANT:
  322.         // It is required that at least one field changes if you are using Doctrine,
  323.         // otherwise the event listeners won't be called and the file is lost
  324.         if ($file) {
  325.             // if 'updatedAt' is not defined in your entity, use another property
  326.             $this->updatedAt = new \DateTime('now');
  327.         }
  328.     }
  329.     public function getFileVignetteLandingPageWebp()
  330.     {
  331.         return $this->fileVignetteLandingPageWebp;
  332.     }
  333.     public function getVignetteLandingPageWebp(): ?string
  334.     {
  335.         return $this->vignetteLandingPageWebp;
  336.     }
  337.     public function setVignetteLandingPageWebp(?string $vignetteLandingPageWebp): self
  338.     {
  339.         $this->vignetteLandingPageWebp $vignetteLandingPageWebp;
  340.         return $this;
  341.     }
  342.     public function setFileVignetteLandingPageWebp(?File $file null)
  343.     {
  344.         $this->fileVignetteLandingPageWebp $file;
  345.         // VERY IMPORTANT:
  346.         // It is required that at least one field changes if you are using Doctrine,
  347.         // otherwise the event listeners won't be called and the file is lost
  348.         if ($file) {
  349.             // if 'updatedAt' is not defined in your entity, use another property
  350.             $this->updatedAt = new \DateTime('now');
  351.         }
  352.     }
  353.     public function getFileVignetteFooterWebp()
  354.     {
  355.         return $this->fileVignetteFooterWebp;
  356.     }
  357.     public function getVignetteNewsletterWebp(): ?string
  358.     {
  359.         return $this->vignetteNewsletterWebp;
  360.     }
  361.     public function setVignetteNewsletterWebp(?string $vignetteNewsletterWebp): self
  362.     {
  363.         $this->vignetteNewsletterWebp $vignetteNewsletterWebp;
  364.         return $this;
  365.     }
  366.     public function setFileVignetteNewsletterWebp(?File $file null)
  367.     {
  368.         $this->fileVignetteNewsletterWebp $file;
  369.         // VERY IMPORTANT:
  370.         // It is required that at least one field changes if you are using Doctrine,
  371.         // otherwise the event listeners won't be called and the file is lost
  372.         if ($file) {
  373.             // if 'updatedAt' is not defined in your entity, use another property
  374.             $this->updatedAt = new \DateTime('now');
  375.         }
  376.     }
  377.     public function getFileVignetteNewsletterWebp()
  378.     {
  379.         return $this->fileVignetteNewsletterWebp;
  380.     }
  381.     /**
  382.      * @return Collection<int, Actuv2InfographieRseCarouselMobileFile>
  383.      */
  384.     public function getActuv2InfographieRseCarouselMobileFiles(): Collection
  385.     {
  386.         return $this->actuv2InfographieRseCarouselMobileFiles;
  387.     }
  388.     public function addActuv2InfographieRseCarouselMobileFile(Actuv2InfographieRseCarouselMobileFile $actuv2InfographieRseCarouselMobileFile): self
  389.     {
  390.         if (!$this->actuv2InfographieRseCarouselMobileFiles->contains($actuv2InfographieRseCarouselMobileFile)) {
  391.             $this->actuv2InfographieRseCarouselMobileFiles[] = $actuv2InfographieRseCarouselMobileFile;
  392.             $actuv2InfographieRseCarouselMobileFile->setActuv2InfographieRse($this);
  393.         }
  394.         return $this;
  395.     }
  396.     public function removeActuv2InfographieRseCarouselMobileFile(Actuv2InfographieRseCarouselMobileFile $actuv2InfographieRseCarouselMobileFile): self
  397.     {
  398.         if ($this->actuv2InfographieRseCarouselMobileFiles->removeElement($actuv2InfographieRseCarouselMobileFile)) {
  399.             // set the owning side to null (unless already changed)
  400.             if ($actuv2InfographieRseCarouselMobileFile->getActuv2InfographieRse() === $this) {
  401.                 $actuv2InfographieRseCarouselMobileFile->setActuv2InfographieRse(null);
  402.             }
  403.         }
  404.         return $this;
  405.     }
  406.     public function getUpdatedAt(): ?\DateTimeInterface
  407.     {
  408.         return $this->updatedAt;
  409.     }
  410.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  411.     {
  412.         $this->updatedAt $updatedAt;
  413.         return $this;
  414.     }
  415.     public function getVignetteArchivage(): ?string
  416.     {
  417.         return $this->vignetteArchivage;
  418.     }
  419.     public function setVignetteArchivage(?string $vignetteArchivage): self
  420.     {
  421.         $this->vignetteArchivage $vignetteArchivage;
  422.         return $this;
  423.     }
  424.     public function setFileVignetteArchivage(?File $file null)
  425.     {
  426.         $this->fileVignetteArchivage $file;
  427.         // VERY IMPORTANT:
  428.         // It is required that at least one field changes if you are using Doctrine,
  429.         // otherwise the event listeners won't be called and the file is lost
  430.         if ($file) {
  431.             // if 'updatedAt' is not defined in your entity, use another property
  432.             $this->updatedAt = new \DateTime('now');
  433.         }
  434.     }
  435.     public function getFileVignetteArchivage()
  436.     {
  437.         return $this->fileVignetteArchivage;
  438.     }
  439.     public function getVignetteArchivageWebp(): ?string
  440.     {
  441.         return $this->vignetteArchivageWebp;
  442.     }
  443.     public function setVignetteArchivageWebp(?string $vignetteArchivageWebp): self
  444.     {
  445.         $this->vignetteArchivageWebp $vignetteArchivageWebp;
  446.         return $this;
  447.     }
  448.     public function setFileVignetteArchivageWebp(?File $file null)
  449.     {
  450.         $this->fileVignetteArchivageWebp $file;
  451.         // VERY IMPORTANT:
  452.         // It is required that at least one field changes if you are using Doctrine,
  453.         // otherwise the event listeners won't be called and the file is lost
  454.         if ($file) {
  455.             // if 'updatedAt' is not defined in your entity, use another property
  456.             $this->updatedAt = new \DateTime('now');
  457.         }
  458.     }
  459.     public function getFileVignetteArchivageWebp()
  460.     {
  461.         return $this->fileVignetteArchivageWebp;
  462.     }
  463.     public function getTitle(): ?string
  464.     {
  465.         return $this->title;
  466.     }
  467.     public function setTitle(?string $title): self
  468.     {
  469.         $this->title $title;
  470.         return $this;
  471.     }
  472.     public function getDescriptiftexte(): ?string
  473.     {
  474.         return $this->descriptifTexte;
  475.     }
  476.     public function setDescriptiftexte(string $descriptifTexte): self
  477.     {
  478.         $this->descriptifTexte $descriptifTexte;
  479.         return $this;
  480.     }
  481.     public function getDescriptifrtf(): ?string
  482.     {
  483.         return $this->descriptifrtf;
  484.     }
  485.     public function setDescriptifrtf(string $descriptifrtf): self
  486.     {
  487.         $this->descriptifrtf $descriptifrtf;
  488.         $descriptifTexte str_replace('&nbsp;'' '$descriptifrtf);
  489.         $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  490.         $descriptifTexte strip_tags($descriptifTexte);
  491.         $this->descriptifTexte $descriptifTexte;
  492.         return $this;
  493.     }
  494. }