src/Entity/Locaux.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LocauxRepository;
  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=LocauxRepository::class)
  9.  * @Vich\Uploadable
  10.  */
  11. class Locaux
  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="locaux_image", fileNameProperty="image")
  25.     */
  26.     private $fichier;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getImage(): ?string
  32.     {
  33.         return $this->image;
  34.     }
  35.     public function setImage(?string $image): self
  36.     {
  37.         $this->image $image;
  38.         return $this;
  39.     } 
  40.     public function setFichier(?File $image null)
  41.     {
  42.         $this->fichier $image;
  43.     }
  44.     public function getFichier()
  45.     {
  46.         return $this->fichier;
  47.     }
  48. }