src/Entity/CBRCUserDescription.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CBRCUserDescriptionRepository;
  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=CBRCUserDescriptionRepository::class)
  9.  * @Vich\Uploadable
  10.  */
  11. class CBRCUserDescription
  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 $name;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $forname;
  27.     /**
  28.      * @ORM\Column(type="text", nullable=true)
  29.      */
  30.     private $biography;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $phonenumber;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $image1;
  39.     /**
  40.      * @ORM\Column(type="datetime", nullable=true)
  41.      * @var \DateTime
  42.      */
  43.     private $updatedAt;
  44.     /**
  45.      * @Vich\UploadableField(mapping="user_images", fileNameProperty="image1")
  46.      * @var File
  47.      */
  48.     private $image1File;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getName(): ?string
  54.     {
  55.         return $this->name;
  56.     }
  57.     public function setName(?string $name): self
  58.     {
  59.         $this->name $name;
  60.         return $this;
  61.     }
  62.     public function getForname(): ?string
  63.     {
  64.         return $this->forname;
  65.     }
  66.     public function setForname(?string $forname): self
  67.     {
  68.         $this->forname $forname;
  69.         return $this;
  70.     }
  71.     public function getBiography(): ?string
  72.     {
  73.         return $this->biography;
  74.     }
  75.     public function setBiography(?string $biography): self
  76.     {
  77.         $this->biography $biography;
  78.         return $this;
  79.     }
  80.     public function getPhonenumber(): ?string
  81.     {
  82.         return $this->phonenumber;
  83.     }
  84.     public function setPhonenumber(?string $phonenumber): self
  85.     {
  86.         $this->phonenumber $phonenumber;
  87.         return $this;
  88.     }
  89.     public function getImage1(): ?string
  90.     {
  91.         return $this->image1;
  92.     }
  93.     public function setImage1(?string $image1): self
  94.     {
  95.         $this->image1 $image1;
  96.         return $this;
  97.     }
  98.     public function setImage1File(File $image null)
  99.     {
  100.         $this->image1File $image;
  101.         // VERY IMPORTANT:
  102.         // It is required that at least one field changes if you are using Doctrine,
  103.         // otherwise the event listeners won't be called and the file is lost
  104.         if ($image) {
  105.             // if 'updatedAt' is not defined in your entity, use another property
  106.             $this->updatedAt = new \DateTime('now');
  107.         }
  108.     }
  109.     public function getImage1File()
  110.     {
  111.         return $this->image1File;
  112.     }
  113. }