<?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
* @Vich\Uploadable
*/
class Dashboard
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*
* @var int
*/
protected $id;
/**
* @ORM\Column(type="datetime", nullable=true)
*
* @var \DateTime
*/
protected $updatedAt;
/**
* @ORM\Column(type="boolean")
*
* @var bool
*/
protected $zone1Enabled;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $title1;
/**
* @ORM\Column(type="text", nullable=true)
*
* @var string
*/
protected $text1;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $image1;
/**
* @Vich\UploadableField(mapping="dashboard", fileNameProperty="image1")
*
* @var File
*/
protected $imageFile1;
/**
* @ORM\Column(type="boolean")
*
* @var bool
*/
protected $eshopEnabled;
/**
* @ORM\Column(type="boolean")
*
* @var bool
*/
protected $zone2Enabled;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $title2;
/**
* @ORM\Column(type="text", nullable=true)
*
* @var string
*/
protected $text2;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $image2;
/**
* @Vich\UploadableField(mapping="dashboard", fileNameProperty="image2")
*
* @var File
*/
protected $imageFile2;
/**
* @ORM\Column(type="boolean", options={"default": false})
*
* @var bool
*/
protected $zone3Enabled = false;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $title3;
/**
* @ORM\Column(type="text", nullable=true)
*
* @var string
*/
protected $text3;
/**
* @ORM\Column(type="string", nullable=true)
*
* @var string
*/
protected $image3;
/**
* @Vich\UploadableField(mapping="dashboard", fileNameProperty="image3")
*
* @var File
*/
protected $imageFile3;
public function getId(): int
{
return $this->id;
}
/**
* @return Dashboard
*/
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
public function isZone1Enabled(): bool
{
return $this->zone1Enabled;
}
/**
* @return Dashboard
*/
public function setZone1Enabled(bool $zone1Enabled): self
{
$this->zone1Enabled = $zone1Enabled;
return $this;
}
public function getTitle1(): ?string
{
return $this->title1;
}
/**
* @return Dashboard
*/
public function setTitle1(?string $title1): self
{
$this->title1 = $title1;
return $this;
}
public function getText1(): ?string
{
return $this->text1;
}
/**
* @return Dashboard
*/
public function setText1(?string $text1): self
{
$this->text1 = $text1;
return $this;
}
public function getImage1(): ?string
{
return $this->image1;
}
/**
* @return Dashboard
*/
public function setImage1(?string $image1): self
{
$this->image1 = $image1;
return $this;
}
public function getImageFile1(): ?File
{
return $this->imageFile1;
}
/**
* @throws \Exception
*
* @return Dashboard
*/
public function setImageFile1(?File $imageFile1): self
{
$this->imageFile1 = $imageFile1;
if ($imageFile1) {
$this->updatedAt = new \DateTime('now');
}
return $this;
}
public function isEshopEnabled(): bool
{
return $this->eshopEnabled;
}
/**
* @return Dashboard
*/
public function setEshopEnabled(bool $eshopEnabled): self
{
$this->eshopEnabled = $eshopEnabled;
return $this;
}
public function isZone2Enabled(): bool
{
return $this->zone2Enabled;
}
/**
* @return Dashboard
*/
public function setZone2Enabled(bool $zone2Enabled): self
{
$this->zone2Enabled = $zone2Enabled;
return $this;
}
public function getTitle2(): ?string
{
return $this->title2;
}
/**
* @return Dashboard
*/
public function setTitle2(?string $title2): self
{
$this->title2 = $title2;
return $this;
}
public function getText2(): ?string
{
return $this->text2;
}
/**
* @return Dashboard
*/
public function setText2(?string $text2): self
{
$this->text2 = $text2;
return $this;
}
public function getImage2(): ?string
{
return $this->image2;
}
/**
* @return Dashboard
*/
public function setImage2(?string $image2): self
{
$this->image2 = $image2;
return $this;
}
public function getImageFile2(): ?File
{
return $this->imageFile2;
}
/**
* @throws \Exception
*
* @return Dashboard
*/
public function setImageFile2(?File $imageFile2): self
{
$this->imageFile2 = $imageFile2;
if ($imageFile2) {
$this->updatedAt = new \DateTime('now');
}
return $this;
}
public function isZone3Enabled(): bool
{
return $this->zone3Enabled;
}
public function setZone3Enabled(bool $zone3Enabled): self
{
$this->zone3Enabled = $zone3Enabled;
return $this;
}
public function getTitle3(): string
{
return $this->title3;
}
public function setTitle3(?string $title3): self
{
$this->title3 = $title3;
return $this;
}
public function getText3(): string
{
return $this->text3;
}
public function setText3(?string $text3): self
{
$this->text3 = $text3;
return $this;
}
public function getImage3(): ?string
{
return $this->image3;
}
public function setImage3(?string $image3): self
{
$this->image3 = $image3;
return $this;
}
public function getImageFile3(): ?File
{
return $this->imageFile3;
}
public function setImageFile3(?File $imageFile3): self
{
$this->imageFile3 = $imageFile3;
if ($imageFile3) {
$this->updatedAt = new \DateTime('now');
}
return $this;
}
public function getProTipsZone(): array
{
return [
'enabled' => $this->zone3Enabled,
'title' => $this->title3,
'text' => $this->text3,
'image' => $this->image3,
];
}
}