src/Entity/BFDescriptionEdition.php line 13

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. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\BFDescriptionEditionRepository")
  8.  * @Vich\Uploadable
  9.  */
  10. class BFDescriptionEdition extends AbstractArrayAccess
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="text", nullable=true)
  20.      */
  21.     private $longdescription;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $website;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $displayedcontactnumber;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $displayedcontactmail;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $participantnumber;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $awards;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      * @var string
  45.      */
  46.     private $image1;
  47.     /**
  48.      * @Vich\UploadableField(mapping="edition_images", fileNameProperty="image1")
  49.      * @var File
  50.      */
  51.     private $image1File;
  52.     
  53.     /**
  54.      * @ORM\Column(type="datetime" , nullable=true)
  55.      * @var \DateTime
  56.      */
  57.     private $updatedAt1;
  58.     
  59.     /**
  60.      * @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
  61.      */
  62.     
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      * @var string
  66.      */
  67.     private $image2;
  68.     /**
  69.      * @Vich\UploadableField(mapping="edition_images", fileNameProperty="image2")
  70.      * @var File
  71.      */
  72.     private $image2File;
  73.     
  74.     /**
  75.      * @ORM\Column(type="datetime" , nullable=true)
  76.      * @var \DateTime
  77.      */
  78.     private $updatedAt2;
  79.     
  80.     /**
  81.      * @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
  82.      */
  83.     
  84.     /**
  85.      * @ORM\Column(type="string", length=255, nullable=true)
  86.      * @var string
  87.      */
  88.     private $image3;
  89.     /**
  90.      * @Vich\UploadableField(mapping="edition_images", fileNameProperty="image3")
  91.      * @var File
  92.      */
  93.     private $image3File;
  94.     
  95.     /**
  96.      * @ORM\Column(type="datetime" , nullable=true)
  97.      * @var \DateTime
  98.      */
  99.     private $updatedAt3;
  100.     
  101.     /**
  102.      * @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
  103.      */
  104.     private $bfedition;
  105.     public function getId(): ?int
  106.     {
  107.         return $this->id;
  108.     }
  109.     public function getLongdescription(): ?string
  110.     {
  111.         return $this->longdescription;
  112.     }
  113.     public function setLongdescription(?string $longdescription): self
  114.     {
  115.         $this->longdescription $longdescription;
  116.         return $this;
  117.     }
  118.     public function getWebsite(): ?string
  119.     {
  120.         return $this->website;
  121.     }
  122.     public function setWebsite(?string $website): self
  123.     {
  124.         $this->website $website;
  125.         return $this;
  126.     }
  127.     public function getDisplayedcontactnumber(): ?string
  128.     {
  129.         return $this->displayedcontactnumber;
  130.     }
  131.     public function setDisplayedcontactnumber(?string $displayedcontactnumber): self
  132.     {
  133.         $this->displayedcontactnumber $displayedcontactnumber;
  134.         return $this;
  135.     }
  136.     public function getDisplayedcontactmail(): ?string
  137.     {
  138.         return $this->displayedcontactmail;
  139.     }
  140.     public function setDisplayedcontactmail(?string $displayedcontactmail): self
  141.     {
  142.         $this->displayedcontactmail $displayedcontactmail;
  143.         return $this;
  144.     }
  145.     public function getParticipantnumber(): ?int
  146.     {
  147.         return $this->participantnumber;
  148.     }
  149.     public function setParticipantnumber(?int $participantnumber): self
  150.     {
  151.         $this->participantnumber $participantnumber;
  152.         return $this;
  153.     }
  154.     public function getAwards(): ?int
  155.     {
  156.         return $this->awards;
  157.     }
  158.     public function setAwards(?int $awards): self
  159.     {
  160.         $this->awards $awards;
  161.         return $this;
  162.     }
  163.     public function getBfedition(): ?BFEdition
  164.     {
  165.         return $this->bfedition;
  166.     }
  167.     public function setBfedition(BFEdition $bfedition): self
  168.     {
  169.         $this->bfedition $bfedition;
  170.         // set the owning side of the relation if necessary
  171.         if ($bfedition->getDescription() !== $this) {
  172.             $bfedition->setDescription($this);
  173.         }
  174.         return $this;
  175.     }
  176.     
  177.     public function setImage1File(File $image null)
  178.     {
  179.         $this->image1File $image;
  180.          
  181.          if ($image) {
  182.             $this->updatedAt1 = new \DateTime('now');
  183.         }
  184.     }
  185.     public function getImage1File()
  186.     {
  187.         return $this->image1File;
  188.     }
  189.     public function setImage1($image)
  190.     {
  191.         $this->image1 $image;
  192.     }
  193.     public function getImage1()
  194.     {
  195.         return $this->image1;
  196.     }
  197.     
  198.     public function setImage2File(File $image null)
  199.     {
  200.         $this->image2File $image;
  201.          
  202.          if ($image) {
  203.             $this->updatedAt2 = new \DateTime('now');
  204.         }
  205.     }
  206.     public function getImage2File()
  207.     {
  208.         return $this->image2File;
  209.     }
  210.     public function setImage2($image)
  211.     {
  212.         $this->image2 $image;
  213.     }
  214.     public function getImage2()
  215.     {
  216.         return $this->image2;
  217.     }
  218.     
  219.     public function setImage3File(File $image null)
  220.     {
  221.         $this->image3File $image;
  222.          
  223.          if ($image) {
  224.             $this->updatedAt3 = new \DateTime('now');
  225.         }
  226.     }
  227.     public function getImage3File()
  228.     {
  229.         return $this->image3File;
  230.     }
  231.     public function setImage3($image)
  232.     {
  233.         $this->image3 $image;
  234.     }
  235.     public function getImage3()
  236.     {
  237.         return $this->image3;
  238.     }
  239.     
  240.     public function getHasimage()
  241.     {
  242.         return ($this->image1 != null || $this->image2 !=null || $this->image3!=null);
  243.     }
  244. }