src/Entity/BFDescriptionChallenge.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\HttpFoundation\File\File;
  5. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\BFDescriptionChallengeRepository")
  9. * @Vich\Uploadable
  10.  */
  11. class BFDescriptionChallenge extends AbstractArrayAccess
  12. {
  13.     /**
  14.      * @ORM\Id()
  15.      * @ORM\GeneratedValue()
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\OneToOne(targetEntity="App\Entity\BFChallenge", mappedBy="description", cascade={"persist", "remove"})
  21.      */
  22.     private $challenge;
  23.     /**
  24.      * @ORM\Column(type="text", nullable=true)
  25.      */
  26.     private $longdescription;
  27.     
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      * @var string
  31.      */
  32.     private $image1;
  33.     /**
  34.      * @Vich\UploadableField(mapping="edition_images", fileNameProperty="image1")
  35.      * @var File
  36.      */
  37.     private $image1File;
  38.     
  39.     /**
  40.      * @ORM\Column(type="datetime", nullable=true)
  41.      * @var \DateTime
  42.      */
  43.     private $updatedAt1;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getChallenge(): ?BFChallenge
  49.     {
  50.         return $this->challenge;
  51.     }
  52.     public function setChallenge(BFChallenge $challenge): self
  53.     {
  54.         $this->challenge $challenge;
  55.         return $this;
  56.     }
  57.     public function getLongdescription(): ?string
  58.     {
  59.         return $this->longdescription;
  60.     }
  61.     public function setLongdescription(?string $longdescription): self
  62.     {
  63.         $this->longdescription $longdescription;
  64.         return $this;
  65.     }
  66.     public function getTextlabel(): ?string
  67.     {
  68.         return $this->textlabel;
  69.     }
  70.     public function setTextlabel(string $textlabel): self
  71.     {
  72.         $this->textlabel $textlabel;
  73.         return $this;
  74.     }
  75.     public function getLabelcolor(): ?string
  76.     {
  77.         return $this->labelcolor;
  78.     }
  79.     public function setLabelcolor(string $labelcolor): self
  80.     {
  81.         $this->labelcolor $labelcolor;
  82.         return $this;
  83.     }
  84.      public function setImage1File(File $image null)
  85.     {
  86.         $this->image1File $image;
  87.          
  88.          if ($image) {
  89.             $this->updatedAt1 = new \DateTime('now');
  90.         }
  91.     }
  92.     public function getImage1File()
  93.     {
  94.         return $this->image1File;
  95.     }
  96.     public function setImage1($image)
  97.     {
  98.         $this->image1 $image;
  99.     }
  100.     public function getImage1()
  101.     {
  102.         return $this->image1;
  103.     }
  104. }