<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass="App\Repository\BFDescriptionEditionRepository")
* @Vich\Uploadable
*/
class BFDescriptionEdition extends AbstractArrayAccess
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $longdescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $website;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $displayedcontactnumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $displayedcontactmail;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $participantnumber;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $awards;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $image1;
/**
* @Vich\UploadableField(mapping="edition_images", fileNameProperty="image1")
* @var File
*/
private $image1File;
/**
* @ORM\Column(type="datetime" , nullable=true)
* @var \DateTime
*/
private $updatedAt1;
/**
* @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
*/
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $image2;
/**
* @Vich\UploadableField(mapping="edition_images", fileNameProperty="image2")
* @var File
*/
private $image2File;
/**
* @ORM\Column(type="datetime" , nullable=true)
* @var \DateTime
*/
private $updatedAt2;
/**
* @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
*/
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $image3;
/**
* @Vich\UploadableField(mapping="edition_images", fileNameProperty="image3")
* @var File
*/
private $image3File;
/**
* @ORM\Column(type="datetime" , nullable=true)
* @var \DateTime
*/
private $updatedAt3;
/**
* @ORM\OneToOne(targetEntity="App\Entity\BFEdition", mappedBy="description", cascade={"persist", "remove"})
*/
private $bfedition;
public function getId(): ?int
{
return $this->id;
}
public function getLongdescription(): ?string
{
return $this->longdescription;
}
public function setLongdescription(?string $longdescription): self
{
$this->longdescription = $longdescription;
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getDisplayedcontactnumber(): ?string
{
return $this->displayedcontactnumber;
}
public function setDisplayedcontactnumber(?string $displayedcontactnumber): self
{
$this->displayedcontactnumber = $displayedcontactnumber;
return $this;
}
public function getDisplayedcontactmail(): ?string
{
return $this->displayedcontactmail;
}
public function setDisplayedcontactmail(?string $displayedcontactmail): self
{
$this->displayedcontactmail = $displayedcontactmail;
return $this;
}
public function getParticipantnumber(): ?int
{
return $this->participantnumber;
}
public function setParticipantnumber(?int $participantnumber): self
{
$this->participantnumber = $participantnumber;
return $this;
}
public function getAwards(): ?int
{
return $this->awards;
}
public function setAwards(?int $awards): self
{
$this->awards = $awards;
return $this;
}
public function getBfedition(): ?BFEdition
{
return $this->bfedition;
}
public function setBfedition(BFEdition $bfedition): self
{
$this->bfedition = $bfedition;
// set the owning side of the relation if necessary
if ($bfedition->getDescription() !== $this) {
$bfedition->setDescription($this);
}
return $this;
}
public function setImage1File(File $image = null)
{
$this->image1File = $image;
if ($image) {
$this->updatedAt1 = new \DateTime('now');
}
}
public function getImage1File()
{
return $this->image1File;
}
public function setImage1($image)
{
$this->image1 = $image;
}
public function getImage1()
{
return $this->image1;
}
public function setImage2File(File $image = null)
{
$this->image2File = $image;
if ($image) {
$this->updatedAt2 = new \DateTime('now');
}
}
public function getImage2File()
{
return $this->image2File;
}
public function setImage2($image)
{
$this->image2 = $image;
}
public function getImage2()
{
return $this->image2;
}
public function setImage3File(File $image = null)
{
$this->image3File = $image;
if ($image) {
$this->updatedAt3 = new \DateTime('now');
}
}
public function getImage3File()
{
return $this->image3File;
}
public function setImage3($image)
{
$this->image3 = $image;
}
public function getImage3()
{
return $this->image3;
}
public function getHasimage()
{
return ($this->image1 != null || $this->image2 !=null || $this->image3!=null);
}
}