src/Entity/PagesLegales.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Symfony\Component\HttpFoundation\File\File;
  4. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @Vich\Uploadable
  8.  */
  9. #[ORM\Entity(repositoryClass\App\Repository\PagesLegalesRepository::class)]
  10. class PagesLegales
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private ?int $id null;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private ?string $filename null;
  18.     /**
  19.      * @Vich\UploadableField(mapping="images", fileNameProperty="filename")
  20.      */
  21.     private ?\Symfony\Component\HttpFoundation\File\File $file null;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $titrenull;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private ?string $meta_titrenull;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private ?string $meta_descriptionnull;
  28.     #[ORM\Column(type'datetime'nullabletrue)]
  29.     private mixed $date_updated;
  30.     #[ORM\Column(type'text'nullabletrue)]
  31.     private ?string $contentnull;
  32.     #[ORM\Column(type'boolean'nullabletrue)]
  33.     private ?bool $actif;
  34.     #[ORM\Column(type'string'length255nullabletrue)]
  35.     private ?string $slugnull;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function setFile(File $file null): void
  41.     {
  42.         $this->file $file;
  43.         if ($file) {
  44.             $this->date_updated = new \DateTime('now');
  45.         }
  46.     }
  47.     public function getFile(): mixed
  48.     {
  49.         return $this->file;
  50.     }
  51.     public function getFilename(): ?string
  52.     {
  53.         return $this->filename;
  54.     }
  55.     public function setFilename(string $filename null): mixed
  56.     {
  57.         $this->filename $filename;
  58.         return $this;
  59.     }
  60.     public function getTitre(): ?string
  61.     {
  62.         return $this->titre;
  63.     }
  64.     public function setTitre(?string $titre): self
  65.     {
  66.         $this->titre $titre;
  67.         return $this;
  68.     }
  69.     public function getMetaTitre(): ?string
  70.     {
  71.         return $this->meta_titre;
  72.     }
  73.     public function setMetaTitre(?string $meta_titre): self
  74.     {
  75.         $this->meta_titre $meta_titre;
  76.         return $this;
  77.     }
  78.     public function getMetaDescription(): ?string
  79.     {
  80.         return $this->meta_description;
  81.     }
  82.     public function setMetaDescription(?string $meta_description): self
  83.     {
  84.         $this->meta_description $meta_description;
  85.         return $this;
  86.     }
  87.     public function getContent(): ?string
  88.     {
  89.         return $this->content;
  90.     }
  91.     public function setContent(?string $content): self
  92.     {
  93.         $this->content $content;
  94.         return $this;
  95.     }
  96.     public function getActif(): ?bool
  97.     {
  98.         return $this->actif;
  99.     }
  100.     public function setActif(?bool $actif): self
  101.     {
  102.         $this->actif $actif;
  103.         return $this;
  104.     }
  105.     public function getSlug(): ?string
  106.     {
  107.         return $this->slug;
  108.     }
  109.     public function setSlug(?string $slug): self
  110.     {
  111.         $this->slug $slug;
  112.         return $this;
  113.     }
  114. }