<?php
namespace App\Entity\Web;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Behaviors\TranslationTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
/**
* @ORM\Table(name="web_news_stores_translation")
* @ORM\Entity(repositoryClass="App\Repository\TranslationRepository")
* @ORM\EntityListeners({"App\Listener\EntityListener"})
*/
class NewsStoreTranslation implements TranslationInterface
{
use TranslationTrait;
/**
* @ORM\Column(type="string", length=2)
*/
protected $locale;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $text = '';
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private ?string $label = '';
public function __construct($locale = null) {
if($locale !== null){
$this->setLocale($locale);
}
}
public function getId(): ?int
{
return $this->id;
}
public function getText(): ?string
{
return $this->text;
}
public function setText($text): self
{
$this->text = $text;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(?string $label): self
{
$this->label = $label;
return $this;
}
}