<?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\BFDescriptionFestivalRepository")
* @Vich\Uploadable
*/
class BFDescriptionFestival 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)
* @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\BFFestival", mappedBy="description", cascade={"persist", "remove"})
*/
private $festival;
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 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 getFestival(): ?BFFestival
{
return $this->festival;
}
public function setFestival(BFFestival $festival): self
{
$this->festival = $festival;
// set the owning side of the relation if necessary
if ($festival->getDescription() !== $this) {
$festival->setDescription($this);
}
return $this;
}
}