src/Entity/Slide.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SlideRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich
  7. /**
  8.  * @ORM\Entity(repositoryClass=SlideRepository::class)
  9.  * @Vich\Uploadable
  10.  */
  11. class Slide
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private $image;
  23.     /**
  24.     * @Vich\UploadableField(mapping="slide_image", fileNameProperty="image")
  25.     */
  26.     private $fichier;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $titre;
  31.     /**
  32.      * @ORM\Column(type="text", nullable=true)
  33.      */
  34.     private $description;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getImage(): ?string
  40.     {
  41.         return $this->image;
  42.     }
  43.     public function setImage(?string $image): self
  44.     {
  45.         $this->image $image;
  46.         return $this;
  47.     }
  48.     
  49.     public function getFichier()
  50.     {
  51.        return $this->fichier
  52.     }
  53.     public function setFichier(?File $image null)
  54.     {
  55.         $this->fichier $image;
  56.     }
  57.     public function getTitre(): ?string
  58.     {
  59.         return $this->titre;
  60.     }
  61.     public function setTitre(?string $titre): self
  62.     {
  63.         $this->titre $titre;
  64.         return $this;
  65.     }
  66.     public function getDescription(): ?string
  67.     {
  68.         return $this->description;
  69.     }
  70.     public function setDescription(?string $description): self
  71.     {
  72.         $this->description $description;
  73.         return $this;
  74.     }
  75. }