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