<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\SettRepository;
use Gedmo\Translatable\Translatable;
use Doctrine\ORM\Mapping\UniqueConstraint;
use App\Entity\Translation\PageTranslation;
use App\Entity\Translation\SettTranslation;
use Gedmo\Mapping\Annotation\TranslationEntity;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
#[ORM\Entity(repositoryClass: SettRepository::class)]
#[UniqueConstraint(name: "intname", columns: ["intname"])]
#[TranslationEntity(class: SettTranslation::class)]
class Sett implements EntityInterface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $type = '';
#[ORM\Column(type: 'string', length: 255)]
private $intname;
#[ORM\Column(type: 'string', length: 255)]
private $name = '';
#[GedmoTranslatable]
#[ORM\Column(type: 'text')]
private $value = '';
#[GedmoLocale]
private $locale;
#[ORM\OneToMany(targetEntity: SettTranslation::class, mappedBy: 'object', cascade: ['persist', 'remove'])]
private $translations;
public function __construct()
{
$this->translations = new ArrayCollection();
}
public function setLocale($locale)
{
$this->locale = $locale;
}
public function getTranslations()
{
return $this->translations;
}
public function addTranslation(SettTranslation $t)
{
if (!$this->translations->contains($t)) {
$this->translations[] = $t;
$t->setObject($this);
}
}
public function getId(): ?int
{
return $this->id;
}
public function getIntname(): ?string
{
return $this->intname;
}
public function setIntname(string $intname): self
{
$this->intname = $intname;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value): self
{
$this->value = $value;
return $this;
}
}