src/Entity/Content/StaticPageTranslation.php line 17
<?php
/**
* Created by PhpStorm.
* User: artemglebov
* Date: 28/02/2018
* Time: 20:48
*/
namespace App\Entity\Content;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
#[ORM\Table(name: 'static_page_translation')]
#[ORM\Entity]
class StaticPageTranslation implements TranslationInterface
{
use TranslationTrait {
isEmpty as ttEmpty;
}
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string')]
private ?string $caption = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $content = null;
public function isEmpty(): bool
{
$parentResult = $this->ttEmpty();
if ($parentResult) {
return true;
}
if (empty($this->caption)) {
return true;
}
return false;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getContent(): ?string
{
return $this->content;
}
/**
* @param string|null $content
*/
public function setContent(?string $content): void
{
$this->content = $content;
}
}