<?php
namespace App\Entity\Application;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Behaviors\TranslationTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation as Serializer;
/**
* @ORM\Table(name="app_notification_translation")
* @ORM\Entity(repositoryClass="App\Repository\TranslationRepository")
* @ORM\HasLifecycleCallbacks()
* @Vich\Uploadable()
*/
class NotificationTranslation implements TranslationInterface
{
use TranslationTrait;
/**
* @ORM\Column(type="string", length=2)
*/
protected $locale;
/**
* @Serializer\Groups({"api"})
* @Serializer\SerializedName("name")
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* @Serializer\Groups({"api"})
* @Serializer\SerializedName("title")
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $text;
/**
* @Serializer\Groups({"api"})
* @Serializer\SerializedName("url")
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $url;
/**
* @Vich\UploadableField(mapping="notification", fileNameProperty="image")
* @Assert\Image(mimeTypes={"image/png", "image/jpeg", "image/jpg", "image/gif"})
* @var File|null
*/
private $imageFile;
/**
* @Serializer\Groups({"api"})
* @Serializer\SerializedName("image")
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $image;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $editts;
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
/**
* @return mixed
*/
public function getText()
{
return $this->text;
}
/**
* @param mixed $text
*/
public function setText($text): void
{
$this->text = $text;
}
/**
* @return mixed
*/
public function getUrl()
{
return $this->url;
}
/**
* @param mixed $url
*/
public function setUrl($url): void
{
$this->url = $url;
}
/**
* Get Image1File
*
* @return null|File
*/
public function getImageFile(): ?File
{
return $this->imageFile;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFile
*/
public function setImageFile(?File $imageFile = null): void
{
$this->imageFile = $imageFile;
if (null !== $imageFile) {
$this->editts = new \DateTime();
}
}
/**
* @return mixed
*/
public function getImage()
{
return $this->image;
}
/**
* @param mixed $image
*/
public function setImage($image): void
{
$this->image = $image;
}
/**
* @return mixed
*/
public function getEditts()
{
return $this->editts;
}
/**
* @param mixed $editts
*/
public function setEditts($editts): void
{
$this->editts = $editts;
}
}