src/Entity/Image.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ImageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. #[ORM\Entity(repositoryClassImageRepository::class)]
  8. #[Vich\Uploadable]
  9. class Image extends Element
  10. {
  11.     #[ORM\ManyToOne(inversedBy'images')]
  12.     private ?Project $projet null;
  13.     /**
  14.      * @Vich\UploadableField(mapping="file_upload", fileNameProperty="imageFiles")
  15.      */
  16.     private ?array $imageFiles = [];
  17.     #[ORM\Column(length255)]
  18.     private ?string $titre null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $description null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $emplacement;
  23.     public function getProjet(): ?Project
  24.     {
  25.         return $this->projet;
  26.     }
  27.     public function setProjet(?Project $projet): static
  28.     {
  29.         $this->projet $projet;
  30.         return $this;
  31.     }
  32.     public function getImageFiles(): ?array
  33.     {
  34.         return $this->imageFiles;
  35.     }
  36.     public function setImageFiles(array $imageFiles): static
  37.     {
  38.         $this->imageFiles $imageFiles;
  39.         return $this;
  40.     }
  41.     public function getTitre(): ?string
  42.     {
  43.         return $this->titre;
  44.     }
  45.     public function setTitre(string $titre): static
  46.     {
  47.         $this->titre $titre;
  48.         return $this;
  49.     }
  50.     public function getDescription(): ?string
  51.     {
  52.         return $this->description;
  53.     }
  54.     public function setDescription(string $description): static
  55.     {
  56.         $this->description $description;
  57.         return $this;
  58.     }
  59.     public function getEmplacement(): ?string
  60.     {
  61.         return $this->emplacement;
  62.     }
  63.     public function setEmplacement(string $emplacement): static
  64.     {
  65.         $this->emplacement $emplacement;
  66.         return $this;
  67.     }
  68. }