src/Entity/Common/CountryTranslation.php line 11
<?php
namespace App\Entity\Common;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
#[ORM\Table(name: 'country_translation')]
#[ORM\Entity]
class CountryTranslation implements TranslationInterface
{
use TranslationTrait {
isEmpty as ttEmpty;
}
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private ?int $id;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $caption = null;
public function isEmpty(): bool
{
$parentResult = $this->ttEmpty();
if ($parentResult) {
return true;
}
if (empty($this->caption)) {
return true;
}
// if (empty($this->text)) return true;
return false;
}
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
}